Storage on database did not get remove after files moved to fs


  • Used Zammad version: 4.1
  • Used Zammad installation type: package
  • Operating system: Centos 7.9
  • Browser + version: Edge

Expected behavior:

  • After change the storage from database to Filesystem and run the command:
    rails> Store::File.move('DB', 'File')
    The database should no longer keep the files.

Actual behavior:

  • The disk usage increase 50% after the command

Steps to reproduce the behavior:

1.Go to admin>Settings>System>Storage> Storage Mechanism
2. Select Filesystem as the storage and submit
3. Check the disk usage by command df -h
3. login into server and run command rails> Store::File.move(‘DB’, ‘File’)
4. Files are moved to fs folder successfully.
5. Check the disk usage by command df -h

Depending on the database server you’ve chosen the decreasing of database files happens automatically (or not).

If you’re running postgresql it’s vacuum process should trigger a automatic clean up of the database files after some time. That highly depends on the data sizes we’re talking about here.

MySQL usually does not do this automatically and needs a manual vacuum.
Please note that above is out of our scope - please consult the documentation of your fitting database server.

The attachments itself probably are already removed from the tables. It’s just a matter of clearing the databases used space.

Thank you for your help!
I am using Postgresql. It took additional 20G after move files to file system storage. Is there a way to triiger the clean up process manually?