Backup file is very big

NextCloudPi version v1.10.6
NextCloudPi image NextCloudPi_03-09-19
Nextcloud version

there are 4 Users:

User1 = 74B
User2 = 0B
User3 = 7,2GB
ncp = 12,3MB

=> < 8GB

When i create a Backup of the NC instance (include data = activ) i got a *.tar file wich is 16,5GB.
Why is the file so big?
A Backup without Date is still 1,6GB

It might be possible that the image previews are the biggest part of your data. You should check the folder size using the following command: du -d 2 -h <absolute-path-to-your-data-dir>.

1 Like


sudo du -d 2 -h /var/www/nextcloud/data/

shows me that:

4.0K /var/www/nextcloud/data/***/cache
1.3G /var/www/nextcloud/data/***/files_versions
6.9G /var/www/nextcloud/data/***/files_trashbin
7.3G /var/www/nextcloud/data/***/files
3.5M /var/www/nextcloud/data/***/uploads
16G /var/www/nextcloud/data/***

*** = User3

thats interessting, is it meaningful to delete these “files_versions” and “files_trashbin”?

Yes, you seem to have the Versions app enabled. You should be able to exclude the directories from your archive, like:

tar cvjf <archive-name>.tgz --exclude <exclude-path-1> --exclude <exclude-path-2> <path-to-be-archived>
1 Like

Ah, great! i didn’t know about the app. As i see i also have “Deleted files” enabled, which is responsible for the trashbin directory.
Now it makes sense. Thank you very much!
So, if i don’t want to use these Apps, i can simply deactivate them.

But is it also possible to delete the origin directories?
e.g.: /var/www/nextcloud/data/***/files_trashbin

I think you can exclude it from your backup, but if you want to cleanup the directories you should use the occ command line tool with on of the following options:

  trashbin:cleanup      Remove deleted files
  trashbin:expire       Expires the users trashbin
1 Like