Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, I'm using the command below to sync two directories. Problem is insted of deleting the files on the target directory it simply appends a ~ character at the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Posts
    7

    Arrow rsync not deleting files on target


    Hi all, I'm using the command below to sync two directories. Problem is insted of deleting the files on the target directory it simply appends a ~ character at the end of the file name. Not sure why this is happening?

    I'd like to have all deletes on the source replicated on target.

    Code:
    rsync -havub --delete /home/ /backup/home/
    The source file had a file called test /home/test.txt which I've deleted.
    Ran the sync again.
    The target now has a file called /backup/home/test.txt~

    Any help is appreciated.

    Thanks

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    Not sure why this is happening?
    Rsync Manual - man rsync

    Code:
    -b, --backup                make backups (see --suffix & --backup-dir)
                --backup-dir=DIR        make backups into hierarchy based in DIR
                --suffix=SUFFIX         backup suffix (default ~ w/o --backup-dir)

  3. #3
    Just Joined!
    Join Date
    Sep 2010
    Posts
    7
    Thanks for the reply, omitting the 'b' switch fixed the problem

    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •