NC doesn't delete S3 objects when instructed to delete files

Nextcloud version: 18.0.1
OS: fpm-alpine

Steps to replicate it:

  1. Use a S3 object storage as primary storage
  2. Upload some file
  3. Delete some file

Expected behaviour:
NC should delete the relevant objects in the bucket when you delete files.

Actual behaviour:
Nothing gets deleted in the bucket. As you upload and delete more files, the bucket only gets bigger.

Log:
There doesn’t to be any relevant log about this issue.

My S3 configuration:

  'objectstore' => array(
        'class' => 'OC\\Files\\ObjectStore\\S3',
        'arguments' => array(
                'bucket' => 'bucketname',
                'autocreate' => false,
                'key'    => 'key',
                'secret' => 'secret'
                'hostname' => 'sgp1.digitaloceanspaces.com',
                'use_ssl' => true,
                'use_path_style'=>false
        ),

This is a digital ocean bug not a bug with Nextcloud.

See attached. 62455555 being 62.4GB total which sounds correct after a few image previews being generated.

I have deleted the media folder today and reuploaded it. 15GB folder. Bucket deleted the files correctly.

I don’t think this is just a DigitalOcean issue. I’ve had a Nextcloud instance running on top of a Minio S3 cluster for a few months now and right now my raw bucket size is about 180GB while I’m only using about 110GB according to Nextcloud. Maybe some of this is prior versions and config but I can’t imagine 60-70GB worth of config files.

Does anyone know of a way to tell Nextcloud to delete everything in a bucket not associated with a db entry?

1 Like

Hello,

I just have the same trouble with my fresh snap install of nextcloud used with S3 Storage of Scaleway (as primary storage).

Same for me, I have a bucket S3 on Scaleway as primary storage with 2.7 To of storage.

My nextcloud use only 1.6 To…

Yes, I also confirm this. Nextcloud doesn’t seem to immediately delete files from the storage when deleted on the web interface and removed from trashbin as well. This is on a fresh install (snap), using Scaleway object storage as primary storage.
Unrelated to this thread but server-side encryption does not work either in this setup for images and txt thumbnails. The uploaded files of these image types can be downloaded as they are, directly from the storage, unencrypted.