Results 1 to 4 of 4

Thread: backup with rsync

  1. #1

    Default backup with rsync

    I have started to use utility rsync to do incremental backups of my personal user data directory tree, as follows:

    pe1800@linux-gkd7:~> ..
    pe1800@linux-gkd7:/home> rsync --archive --exclude=.* --delete --backup pe1800 /media/Lexar

    It works well:

    only files which have been changed or new files are sent to the destination.
    --delete sees to it that files no longer part of the source are deleted from the destination.
    --backup retains at the destination previous versions of files which are being changed or deleted by attaching a ~ suffix

    But I have noticed that the versions of files which change frequently are all retained with suffixes ~, ~~, ~~ and so on. That is a bit too much of a good thing, one level, ~ is enough. Does anyone know how to limit the numberl of previous versions? I have looked through the many options but do not see it or, perhaps, do not understand it.

    I will appreciate your advice. Thank you.

  2. #2
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,131

    Default Re: backup with rsync

    Just guessing -- NOT tested.

    Code:
    --exclude="*~~"  --delete-excluded
    ~Thank you for sharing an interesting problem.
    --
    slàinte mhath,
    rayH

  3. #3

    Default Re: backup with rsync

    Thank you.

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: backup with rsync

    On 2013-04-25 04:36, pe1800 wrote:
    > I will appreciate your advice. Thank you.


    I can suggest other options.

    For example, you can use rdiff-backup or rsnapshot. On the second one,
    you get a different tree of each backup you do, but the files that have
    not changed are in fact hardlinks to the previous tree files. Only one
    copy exists, saving space and time. Changed files are copied whole, of
    course.

    It actually uses rsync to do it.

    With rdiff-backup, the previous versions are stored as rdiffs instead,
    smaller sizes.


    With rsync, you do something like this:

    Code:
    
    > OPTIONS="--archive --acls --xattrs --hard-links --del --stats --human-readable "
    
    >     rsync $OPTIONS --link-dest=$PREVIOUS  --exclude=/lost+found   \
    >         $WHAT/   $DESTINATION$QUE
    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

Posting Permissions

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