# 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//duplicity/cache/` (that folder has to exist of course).
For example:
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
After having changed the script like that /dev/md0 doesn't seem to be affected by backup process anymore.