Duplicity
How to prevent your root system from running full when using duplicity for regular backups
I recently experienced a nasty problem while backing up data from my new Synology NAS. Suddenly the NAS refused me when logging into the web interface with a message that my devices were full and so logins were impossible until I reboot the system.
As I was quite sure, that the NAS hasn't filled up 8TB of space I searched the web. Fortunately I could still login using ssh and quickly found that it was /dev/md0 that ran full. Research showed that's just the root filesystem of the NAS which is limited to 2.3 GB.
Long story short
I used duplicity to backup my docker setups to a far larger backup volume. But by default duplicity caches the repository to /root/.cache/duplicity, i.e. if you use root to execute the backup task. Which you will often have to because of privileges.
So the solution was to first delete the content of /root/.cache/duplicity. Afterwards I could login again without any further problem. To prevent this from happening again I had to adjust my backup script. Everytime I used duplicity in it I had to add the option --archive-dir /volume2/homes/<backup_user>/duplicity/cache/
(that folder has to exist of course).
For example:
<cli> duplicity \ –archive-dir /volume2/homes/backup/duplicity/cache/ \ –full-if-older-than 1W \ –gpg-binary=„/usr/local/bin/gpg“ \ /volume1/docker/ \ file:/volumeUSB1/usbshare/docker </cli> <markdown> After having changed the script like that /dev/md0 doesn't seem to be affected by backup process anymore. </markdown>