RSync Problem

Home » CentOS » RSync Problem
CentOS 1 Comment

I use an external USB drive and rsync to back up everything in /home. The USB drive has an entry in fstab and I mount it with “# mount /mnt”
The rsync command I use is:

rsync -av –delete –include=’.thunderbird’ –include=’.filezilla’
–include=’.putty’ \
–exclude=’.*’ –exclude=’Desktop’ –exclude=’VirtualBox*’ /home/*
/mnt/home/

After I deleted one of the users on my system, including their home directory, I ran the rsync command. I found that the deleted user’s home directory wasn’t deleted from
/mnt/home. I thought that the –delete option deleted everything on the destination that was not on the source.

Please help. Thank you, Joe

One thought on - RSync Problem

  • In article <52FE23C4.50101@gmail.com>, Joseph Hesse wrote:

    If you had specified /home/ instead of /home/* it would have done so.

    If you originally had users fred, joe and mary on the system, your previous rsyncs would have said … /home/fred /home/joe /home/mary /mnt/home/

    Then when you deleted joe, your rsync says … /home/fred /home/mary /mnt/home/
    so it doesn’t even consider /home/joe on the target.

    If you do change it, make sure you say /home/ and not /home

    Hope this helps!
    Tony