diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2021-11-09 11:05:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 11:05:35 +0100 |
commit | e1ab52d7ec7370a6f9f5937192d6003206af1ac0 (patch) | |
tree | aecc8b696b0021e073fd205dd6e126fb4f178e8f /support | |
parent | c49c366ac320fe5ac3dc08f5891fe5898c1b34e3 (diff) | |
download | PeerTube-e1ab52d7ec7370a6f9f5937192d6003206af1ac0.tar.gz PeerTube-e1ab52d7ec7370a6f9f5937192d6003206af1ac0.tar.zst PeerTube-e1ab52d7ec7370a6f9f5937192d6003206af1ac0.zip |
Add migrate-to-object-storage script (#4481)
* add migrate-to-object-storage-script
closes #4467
* add migrate-to-unique-playlist-filenames script
* fix(migrate-to-unique-playlist-filenames): update master/segments256
run updateMasterHLSPlaylist and updateSha256VODSegments after
file rename.
* Improve move to object storage scripts
* PR remarks
Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'support')
-rw-r--r-- | support/doc/tools.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/support/doc/tools.md b/support/doc/tools.md index 78ace1344..c8cc2d1d7 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md | |||
@@ -17,6 +17,7 @@ | |||
17 | - [regenerate-thumbnails.js](#regenerate-thumbnailsjs) | 17 | - [regenerate-thumbnails.js](#regenerate-thumbnailsjs) |
18 | - [create-transcoding-job.js](#create-transcoding-jobjs) | 18 | - [create-transcoding-job.js](#create-transcoding-jobjs) |
19 | - [create-import-video-file-job.js](#create-import-video-file-jobjs) | 19 | - [create-import-video-file-job.js](#create-import-video-file-jobjs) |
20 | - [create-move-video-storage-job.js](#create-move-video-storage-jobjs) | ||
20 | - [prune-storage.js](#prune-storagejs) | 21 | - [prune-storage.js](#prune-storagejs) |
21 | - [update-host.js](#update-hostjs) | 22 | - [update-host.js](#update-hostjs) |
22 | - [reset-password.js](#reset-passwordjs) | 23 | - [reset-password.js](#reset-passwordjs) |
@@ -303,6 +304,33 @@ $ cd /var/www/peertube-docker | |||
303 | $ docker-compose exec -u peertube peertube npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] | 304 | $ docker-compose exec -u peertube peertube npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] |
304 | ``` | 305 | ``` |
305 | 306 | ||
307 | ### create-move-video-storage-job.js | ||
308 | |||
309 | Use this script to move all video files or a specific video file to object storage. | ||
310 | |||
311 | ```bash | ||
312 | $ # Basic installation | ||
313 | $ cd /var/www/peertube/peertube-latest | ||
314 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-move-video-storage-job -- --to-object-storage -v [videoUUID] | ||
315 | |||
316 | $ # Docker installation | ||
317 | $ cd /var/www/peertube-docker | ||
318 | $ docker-compose exec -u peertube peertube npm run create-move-video-storage-job -- --to-object-storage -v [videoUUID] | ||
319 | ``` | ||
320 | |||
321 | The script can also move all video files that are not already in object storage: | ||
322 | |||
323 | ```bash | ||
324 | $ # Basic installation | ||
325 | $ cd /var/www/peertube/peertube-latest | ||
326 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-move-video-storage-job -- --to-object-storage --all-videos | ||
327 | |||
328 | $ # Docker installation | ||
329 | $ cd /var/www/peertube-docker | ||
330 | $ docker-compose exec -u peertube peertube npm run create-move-video-storage-job -- --to-object-storage --all-videos | ||
331 | ``` | ||
332 | |||
333 | |||
306 | ### prune-storage.js | 334 | ### prune-storage.js |
307 | 335 | ||
308 | Some transcoded videos or shutdown at a bad time can leave some unused files on your storage. | 336 | Some transcoded videos or shutdown at a bad time can leave some unused files on your storage. |