2

Background

I am trying to make a very comprehensive backup of my Ubuntu system. I am running the following rsync command:

sudo rsync -aAEHSXxv --progress --delete --exclude={/home/sterlingbutters/Butters-Ubuntu-Backup/*, /home/*/.cache/*, /home/*/.local/share/Trash/*, /dev/*, /proc/*, /sys/*, /tmp/*, /mnt/*, /media/*, /lost+found} / /home/sterlingbutters/Butters-Ubuntu-Backup

Where the file structure should be pretty evident.

Problems

  1. I get the following output regarding non-existent files/directories:

    rsync: change_dir "/home/*/.cache" failed: No such file or directory (2)
    rsync: change_dir "/home/*/.local/share/Trash" failed: No such file or directory (2)
    rsync: link_stat "/dev/*," failed: No such file or directory (2)
    rsync: link_stat "/proc/*," failed: No such file or directory (2)
    rsync: link_stat "/sys/*," failed: No such file or directory (2)
    rsync: link_stat "/tmp/*," failed: No such file or directory (2)
    rsync: link_stat "/mnt/*," failed: No such file or directory (2)
    rsync: link_stat "/media/*," failed: No such file or directory (2)
    rsync: link_stat "/lost+found}" failed: No such file or directory (2)
    created directory /home/sterlingbutters/Butters-Ubuntu-Backup
    IO error encountered -- skipping file deletion
    

    Does this mean that file doesn't exist on the source or the destination? (Because they clearly exist on the source)

  2. Later on, I start to get a bunch of entries regarding the .cache directory that I thought I excluded:

    ... 
    home/sterlingbutters/.cache/mozilla/firefox/90d4yr8z.default/cache2/entries/76A1426700B3173C5B976F65F04FA6CD01D90D15
    ...
    
  3. I'm worried to "just see what happens" because if the directories aren't excluded correctly, I might end up with an infinite copy-loop since the destination directory is located at ~/.

  4. My code almost exactly follows the patterns specified in the docs here (the only changes I've made I feel should still be acceptable): I also feel that my syntax follows that which I have found on other forum posts. Even if it didn't, wouldn't that pose a discrepancy between that and the docs in the link?

All help is appreciated - Thanks!

Fabby
  • 35,017

1 Answers1

3

Your rsync command line was almost correct.

There should be no space after the commas in the exclude list,

sudo rsync -aAEHSXxv --progress --delete --exclude={/home/sterlingbutters/Butters-Ubuntu-Backup/*,/home/*/.cache/*,/home/*/.local/share/Trash/*,/dev/*,/proc/*,/sys/*,/tmp/*,/mnt/*,/media/*,/lost+found} / /home/sterlingbutters/Butters-Ubuntu-Backup
sudodus
  • 47,684