dolorosus / RaspiBackup

Backup your raspi
GNU General Public License v3.0
13 stars 4 forks source link

Tweaking rsync excludes #2

Closed ephestione closed 5 years ago

ephestione commented 5 years ago

As per this you might want to add var/cache/apt/archives/ in the excludes, and also change home/pi/.cache/ to home/${USERNAME}/.cache/ and define that parameter by default in the beginning of the script (most users will have totally removed user 'pi', and will have a single folder under /home/, which you can take the username from, and then maybe add a optarg to commandline to specify that... but maybe it would be overkill

dolorosus commented 5 years ago

Thanks, I added /var/cache/apt/archives/ to the exclusion list.

Gimmie some to time to think how to handle the username...

dolorosus commented 5 years ago

I think it would be better to exclude ${HOME##/}/.cache/

ephestione commented 5 years ago
root@raspi3:/home/pi2pi# echo ${HOME##/}
root

In my case that wouldn't work, but /home/*/.cache seems to do the trick