-2

I have hard drive that I back up with rsync to a network-attached storage. There are some non-empty directories at the destination (the nas) that do not exist on the source anymore. It is not a permission issue.

I had a mount issue on the OS.

The --delete option does work. The --force option (without the --delete) does not report any more diretory deletions (--progress option).

rsync -raz --progress --delete --ignore-errors --exclude-from='exclude_list.txt' {source} {destination}
jjack
  • 103
  • 1
  • 4

2 Answers2

1

I had the same situation but just synchronizing a master and slave:

rsync -rpogt --delete ${origin} ${destination}
alphamikevictor
  • 1,062
  • 6
  • 19
  • I don't understand your syntax. What do the $-signs do? – jjack May 22 '15 at 11:00
  • @jjack is just to must replace `${origin}` with your source and `${destination}`with your destination, like for example: `rsync -rpogt --delete /home/ /nfsnas/home/` – alphamikevictor May 22 '15 at 11:16
0

Try this command

rsync -ravzX --delete <source> <destination>
Booth
  • 488
  • 2
  • 4
  • 11