I back up my wifes' stuff to a raspberry pi. She has sorted out some stuff, moving files and folders, but rsync isnt reproducing the changes. Can anyone tell me why ?

I mount the (windows) share

sudo mount -t cifs // /mnt/wife-PC -o username=PC,password=xxxx,ro,uid=pi,gid=pi

then rsync it

rsync -vv -rtdizb --no-owner --no-perms --no-group  --exclude *ini --exclude *Trash* --progress --log-file=/tmp/rsynclog --backup-dir=/mnt/seagate/deletedfiles/wife-PC/backup-2020-09-07 --delete /mnt/wife-PC/Documents   /mnt/seagate/wife-PC

The new changed source

pi@raspberrypi:~ $ ls -l /mnt/wife-PC/Documents...Family/wife/ALL\ PHOTOS/ | grep '\bF\w*' | grep -v Feb 
drwxr-xr-x 2 pi pi      0 Apr 18  2018 Farm & Garden
rwxr-xr-x 1 pi pi 1108 Sep  7 16:04 Family Photos - Shortcut.lnk

the target.Id expected it to move 'From dropbox' and 'From phone' and contents , but it hasnt

pi@raspberrypi:~ $ ls -l /mnt/seagate/wife-PC/....wife/ALL\ PHOTOS/ |grep '\bF\w*' | grep -v Feb 

drwxrwxrwx 1 pi pi      4096 Apr 18  2018  Farm & Garden
rwxrwxrwx 1 pi pi      1108 Sep  7 16:04 Family Photos - Shortcut.lnk
drwxrwxrwx 1 pi pi      4096 Jun  7  2017 Flood 
drwxrwxrwx 1 pi pi 32768 Sep  7 19:41 From dropbox 21Dec18 
drwxrwxrwx 1 pi pi 0    Aug 26 18:15 From Phone 26Aug20 pi@raspberrypi:~ $

it has put the old .lnk in the deleted files folder

pi@raspberrypi:~ $ ls -l /mnt/seagate/deletedfiles/wife-PC/backup-2020-09-07/Documents/.....y/wife/ALL\ PHOTOS/ total 4
rwxrwxrwx 1 pi pi 887 Mar  4  2013 Family Photos - Shortcut.lnk pi@raspberrypi:~ $
  • 1
    You're running with -vv. Do these folders appear in the output?
    – BowlOfRed
    Sep 8 '20 at 3:18
  • the log file : $ cat /tmp/rsynclog | grep dropbox 2020/09/07 19:53:02 [19105] directory has vanished: "/mnt/wife-PC/Documents/fam...../ALL PHOTOS/From dropbox 21Dec18"
    – user358360
    Sep 8 '20 at 10:18
  • the log file : ran out of time ! 2020/09/07 19:53:11 [19105] .d..t...... Documents/fam....ALL PHOTOS/From dropbox 21Dec18/
    – user358360
    Sep 8 '20 at 10:28
  • "Directory has vanished" sounds like the SMB mount has gone away. May not be a rsync problem, but a network or SMB issue. I'd probably look through the log and find the last place progress was made. See if there's anything odd about that point.
    – BowlOfRed
    Sep 8 '20 at 15:25

the -r and the -d options dont go together. ( not sure how they both got there !)

rsync -vv -rtib works as expected

  • Interesting. I did notice that originally, but the documentation suggests that -r overrides -d. "If you specify both --dirs and --recursive, --recursive takes precedence." Your experience suggests that statement from the manual is incomplete.
    – BowlOfRed
    Sep 8 '20 at 16:35
  • Documentation says, "If you specify both --dirs and --recursive, --recursive takes precedence", so your rsync -vv -rtib is the same as rsync -vv -rtdib
    – roaima
    Sep 8 '20 at 21:06
  • 1
    The -z is pointless on a local-filesystem to local-filesystem copy. You'd be far better off not mounting the Pi with SMB but instead using rsync to copy over ssh to the Pi. At the moment your rsync is basically cp -a, so any change to a file causes the entire file to be recopied.
    – roaima
    Sep 8 '20 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.