Two Part Question
PART ONE: I want to use the the following rsync command to back up my Ubuntu 18.04 file system starting at / during an Ubuntu Live Session (meaning my file sys), but I am not sure if I all the necessary / recommended excludes and I am not sure if my syntax is correct or not:
sudo rsync -aAXHv --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home/*","/swapfile"} /from/live/session/to/my/file/system/ /path/to/my/external/storage/file-system-18.04/ I plan to re-use this command to back up my file system periodically to the same external hd location, so I include --delete
Specifically, under /root/ directory I have .cache, .config, .dbus, .gnupg, .gvfs, .local, .mozilla
I know that gvfs, mozilla, dbus, and gnupg -must- be excluded (if I am wrong let me know), but how would the excludes look? (I also want to exclude the local/share/Trash folder as well)
sudo rsync -aAXHv --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home/*","/swapfile","/root/*/gvfs/","/root/*mozilla/","/root/*/dbus/","/root/*/gnupg/","/root/*/local/share/Trash"} /from/live/session/to/my/file/system/ /path/to/my/external/storage/file-system-18.04/ Is the syntax above right? What am I missing?
PART TWO: After I backup my file system I want to automatically save it to a zip archive to be burned to a disk, uploaded, etc. (good back systems are redundantly paranoid) I want to use this command:
sudo zip -p password -ry "/path/to/my/external/storage/post-rsync-zips/file-system-18.04-backup.$(date +"%F").zip" /path/to/my/external/storage/file-system-18.04
During testing I start a zip warning: name not matched message, which I expect because the actual archive has not yet been created at /path/to/my/external/storage/post-rsync-zips/ .
However, here's the odd ball problem: the zipping process actually quits with the following error:
zip I/O error: No space left on device zip error: Output file write failure (write error on zip file) I am using a 2TB external the file-system-18.04 folder is 230GB and another folder of previous backups of 430GB, leaving 1280GB of free space for my zip directory to use.... so why am I getting the error?