Results 1 to 5 of 5

Thread: Needs proof-reading of rsync param -

Hybrid View

  1. #1
    Join Date
    Sep 2011
    Beans
    180
    Distro
    Ubuntu

    Question Needs proof-reading of rsync param -

    Currently using rsync to backup my Home directory. I had previously used this param to exclude anything that began with "." - folders and files, but realized, I could be losing some important files with that.

    Here was the original command with param:

    Code:
    rsync -r -t -v --progress -b -s --exclude .* /home/alex/ /media/Recov/alex/
    Then I tweaked it to only apply to directories that began with "."

    Code:
    rsync -r -t -v --progress -b -s --exclude .*/ /home/alex/ /media/Recov/alex/
    Does can someone proof read this for me and let me know if I'm on the right track?

    btw - this part:
    Code:
    /home/alex/ /media/Recov/alex/
    is just me backing up my home folder to a partition on my external drive called "Recov" - dont mind it - its just merely the destination.

  2. #2
    Join Date
    Jul 2010
    Location
    51.508056, -0.128056
    Beans
    203
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Needs proof-reading of rsync param -

    You can test out your new command by adding --dry-run or -n to it, which will tell you what it would have done but wont' actually do it. You've already got -v verbose, so that should be good enough.

  3. #3
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    1,222

    Re: Needs proof-reading of rsync param -

    If you want, you can combine single letter options for brevity:

    rsync -rtvbs

    if the destination is a FAT16 or FAT32 file system, add --modify-window=1 to the options. the man page explains why.

    source and destination look ok.

    FYI: for comparison, I use rsync -rti for the basic options. option 'i' gives a list of all files changed or added to the destination. If you don't want old deleted files to accumulate in the destination, add --delete.

    Added:

    Not sure what the -b is going to produce. Backup files of the backup files? Where do they go?
    Last edited by Dennis N; May 9th, 2012 at 06:46 AM.

  4. #4
    Join Date
    Nov 2004
    Beans
    558
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Needs proof-reading of rsync param -

    you can even do incremental backups: assuming you have already backed up /src to /bkp/date0, you can do an incremental backup to /bkp/date1 with
    Code:
    /usr/bin/rsync --link-dest /bkp/date0 ...
    where ... are your rsync opts from above.

    i then usually make a link
    Code:
    $ ln -s /bkp/date1 /bkp/current
    or something alike. my script then knows it has to use /bkp/current as link-dest.

  5. #5
    Join Date
    Sep 2011
    Beans
    180
    Distro
    Ubuntu

    Smile Re: Needs proof-reading of rsync param -

    Quote Originally Posted by Dennis N View Post
    If you want, you can combine single letter options for brevity:

    rsync -rtvbs

    if the destination is a FAT16 or FAT32 file system, add --modify-window=1 to the options. the man page explains why.

    source and destination look ok.

    FYI: for comparison, I use rsync -rti for the basic options. option 'i' gives a list of all files changed or added to the destination. If you don't want old deleted files to accumulate in the destination, add --delete.

    Added:

    Not sure what the -b is going to produce. Backup files of the backup files? Where do they go?
    -b backing up my Home Folder to make backup files of the current ones.

    Quote Originally Posted by surfer View Post
    you can even do incremental backups: assuming you have already backed up /src to /bkp/date0, you can do an incremental backup to /bkp/date1 with
    Code:
    /usr/bin/rsync --link-dest /bkp/date0 ...
    where ... are your rsync opts from above.

    i then usually make a link
    Code:
    $ ln -s /bkp/date1 /bkp/current
    or something alike. my script then knows it has to use /bkp/current as link-dest.
    Thanks guys, All setup to work.

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
  •