Move to storage fails: bucket does not exist

Hello,

I am facing a new issue regarding my storage use.
My production.yaml is correctly configured so that newly uploaded videos move to storage automatically. And it works, my two last videos are in my backblaze storage!

Yet, I had a couple of videos, three to be exact, that were left over my internal server filesystem. I am using this script to move them to storage:

Unfortunately, i get the below error when going to the logs:

Job: 12
Type: move-to-object-storage
Processed on 8/18/24, 8:40:30.263 PM
Finished on -

{
  "videoUUID": "679c7579-74b6-400f-9db5-20c5a6151a24",
  "isNewVideo": false,
  "previousVideoState": 8
}

NoSuchBucket: The specified bucket does not exist: web-videos
    at de_NoSuchBucketRes (/var/www/peertube/node_modules/@aws-sdk/client-s3/dist-cjs/index.js:4782:21)
    at de_CommandError (/var/www/peertube/node_modules/@aws-sdk/client-s3/dist-cjs/index.js:4723:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /var/www/peertube/node_modules/@smithy/middleware-serde/dist-cjs/index.js:35:20
    at async /var/www/peertube/node_modules/@aws-sdk/middleware-signing/dist-cjs/index.js:226:18
    at async /var/www/peertube/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38
    at async /var/www/peertube/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:98:20
    at async /var/www/peertube/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:121:14
    at async /var/www/peertube/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:34:22
    at async _Upload.__doConcurrentUpload (/var/www/peertube/node_modules/@aws-sdk/lib-storage/dist-cjs/index.js:312:30)
    at async Promise.all (index 0)
    at async _Upload.__doMultipartUpload (/var/www/peertube/node_modules/@aws-sdk/lib-storage/dist-cjs/index.js:394:5)
    at async _Upload.done (/var/www/peertube/node_modules/@aws-sdk/lib-storage/dist-cjs/index.js:213:12)
    at async uploadToStorage (file:///var/www/peertube/dist/core/lib/object-storage/object-storage-helpers.js:173:22)
    at async moveWebVideoFiles (file:///var/www/peertube/dist/core/lib/job-queue/handlers/move-to-object-storage.js:51:25)
    at async moveToJob (file:///var/www/peertube/dist/core/lib/job-queue/handlers/shared/move-video.js:25:13)

But the bucket I am going for, is not named like that! I have searched into my configuration yaml file, and the only thing called « web_videos » is here:

And as I have said earlier: my backblaze storage folder configuration works, otherwise my two last videos wouldnt be there.

Its a bit confusing two different storage are called storage. Or are there the same, and must I put my s3 storage path there in this configuration file?

Thank you very much!

Proof that my configuration is working

But that is only for newly uploaded videos, not running the « Move video files from filesystem to object storage », it throws me the error from my post above

Is it possible to get some help please?

Thank you!

It sounds like you might be dealing with different storage types. Ensure your S3 path is correctly specified in your configuration file to avoid confusion and ensure proper storage management.

can you please develop?
My configuration should be correct; if newly videos are moving correctly to my bucket, no?
How would you define storages in the configuration I have shared above?

Sorry, I am quite new to this.

Hi,

Object storage configuration is under object_storage key. See the production.yaml example configuration: PeerTube/config/production.yaml.example at develop · Chocobozzz/PeerTube · GitHub

I don’t know how yunohost manages the PeerTube configuration, you may ask them if it’s safe to add this section to your current production.yaml :slight_smile: