Videos not playing from old s3 service when switching production.yaml to new service

When I switch instances to my new s3 store, the ones on the old s3 store stop being available. The new videos work fine, but the old ones are unavailable and give an index error in the admin video overview when attempting to perform any action. Copying the file from the old object store bucket to the new one gets rid of the error, but still won’t play, like it’s seeing it at the new location but using the old credentials or something

This feature worked fine in my old testing prior to 6.0 but has failed in a couple recent migrations. This time may be different due to moving between different architctures in s3 storage, or some other common config error I’ve made.

Anyone else having issues with videos on a previous s3 service that’s no longer in production.yaml? I’m going to try a clean install to see if I can duplicate the issue


I’m sorry about that. Migrating to another object storage provider is not supported yet: Remote storage (S3) | PeerTube documentation

You can subscribe to the issue: Support object storage provider migration · Issue #5654 · Chocobozzz/PeerTube · GitHub

You may be able to manually migrate videos by updating the fileUrl column of videoFile table and the playlistUrl and segmentsSha256Url columns of videoStreamingPlaylist table.

User exports can be migrated by updating fileUrl column of userExport table.

And video source files by updating fileUrl column of videoSource table.

so this is no longer valid?

PeerTube stores object URLs in the database, so even if you change the object storage configuration it will serve previously uploaded videos using the old object storage endpoint while serving new uploads using the new object storage endpoint.

Narrowed it down with a fresh install
uploaded videos with CDN1 configuration in production.yaml, worked
changed production to CDN2 configuration and new videos work and CDN1 videos don’t
the CDN2 configuration uses a value for base_url, cleared that out leaving the rest of the configuration set for CDN2 and restarted
now the CDN1 videos are working and CDN2 videos aren’t

So as long as neither s3 object store needs base_url configured, they can coexist and work together thanks to the stored endpoint. If one does require base_url and the other doesn’t they don’t seem to play together well.

Thanks for the suggestions, I’ll experiement more to see what I can do for the instance with 7tb of videos without having to move all videos back to local storage first.

so this is no longer valid?

It’s still valid, but in some cases PeerTube rebuild the file URLs using your current object storage configuration (to create signed URLs for private videos or to proxify private ressources for example).