sudo rsync -avxHAX --progress --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home/*/.cache/*","/var/cache/*","/var/tmp/*"} / /path/to/backup/destination/
Let's break down this rsync command:
-
sudo
: Run the command with root privileges, necessary for accessing all system files. -
rsync
: The command itself.