Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Need very specific rsync functionality

    Hi all, I'm fairly green to the world of Linux so please go easy.

    I'd like to use rsync to backup my files with the following functionality, and I wondered if one of you could devise a command line to do so. I have trawled 'man rsync' and lots of online help, but there are just too many variables for me to comprehend what I might need here.

    1) Check which source files are NEW and EDITED in comparison to destination files
    2) Copy and write changes to destination
    3) Check which source files have been DELETED compared to destination
    4) Don't delete, but move the mirrors of the deleted files at the destination to a new folder where they can remain in case I need them at a later date (and I will manually delete them)

    It is step 3 and 4 that I particularly need help with.

    Many thanks in advance (:

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    rsync -av --delete -b --backup-dir=<BACKUP_DIR_PATH> <SOURCE_PATH> <DESTINATION_PATH>

    Leave out the -v (verbose), if there are a lot of files.

    The destination can as well be on a remote server via an rsync server or an ssh tunnel. (-e ssh)

  3. #3
    Thanks, Irithori I appreciate it


Posting Permissions

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