Results 1 to 2 of 2

Thread: Check with rsync if destination is up to date

  1. #1
    Join Date
    Oct 2010
    Beans
    8

    Check with rsync if destination is up to date

    I'm making a script to backup some stuff using crontab, is there anyway to tell if rsync actually needs to do something?

    i.e. if [everything in destination is not already up to date]; then do something
    else do nothing

    I've tried using the exit state ($?), but that gives '0' if something was updated or not.

    Something involving rsync --dry-run maybe?

    Thanks

  2. #2
    Join Date
    Jun 2009
    Beans
    1,618
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Check with rsync if destination is up to date

    I would delve into the "--itemize-changes" option...
    Comitas. Brevitas. Nulla ambitio.

Tags for this Thread

Bookmarks

Posting Permissions

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