Skip to main content
Bounty Ended with Steven D's answer chosen by Cheng
edited title; edited title
Link
Cheng
  • 6.9k
  • 12
  • 43
  • 42

How sync Delete extraneous files from SRC to DEST, also remove files in the DEST that doesn't exist in SRCdest dir via rsync?

Bounty Started worth 50 reputation by Cheng
added 8 characters in body; edited title; edited title
Source Link
Cheng
  • 6.9k
  • 12
  • 43
  • 42

`rsync -d --delete *.jpg` doesn't How sync files from SRC to DEST, also remove files in the DEST that notdoesn't exist on the origin locationin SRC?

Say I have

Server ASRC 
  001.jpg
  002.jpg
  001.txt
  a.zip

Server BDEST
  hello.jpg

rsync -d --delete server_aSRC:{*.jpg ,*.txt} DEST

It doesn't remove hello.jpg from server BDEST, any idea how to archive this?

`rsync -d --delete *.jpg` doesn't remove files that not exist on the origin location?

Say I have

Server A 
  001.jpg
  002.jpg
  a.zip

Server B
  hello.jpg

rsync -d --delete server_a:*.jpg .

It doesn't remove hello.jpg from server B, any idea how to archive this?

How sync files from SRC to DEST, also remove files in the DEST that doesn't exist in SRC?

Say I have

SRC 
  001.jpg
  002.jpg
  001.txt
  a.zip

DEST
  hello.jpg

rsync -d --delete SRC:{*.jpg,*.txt} DEST

It doesn't remove hello.jpg from DEST, any idea how to archive this?

Source Link
Cheng
  • 6.9k
  • 12
  • 43
  • 42

`rsync -d --delete *.jpg` doesn't remove files that not exist on the origin location?

Say I have

Server A 
  001.jpg
  002.jpg
  a.zip

Server B
  hello.jpg

rsync -d --delete server_a:*.jpg .

It doesn't remove hello.jpg from server B, any idea how to archive this?