Page 1 of 6 123 ... LastLast
Results 1 to 10 of 56

Thread: using rsync for backups

  1. #1
    Join Date
    Nov 2008
    Beans
    50

    using rsync for backups

    I need some help please
    I got two linux servers, one of then a ubuntu server
    What am doing is backing up files from the ubuntu server to this other server using rsync. I want to preserve file permissions and owners so i created the same users and groups on the other server.
    Now i rsync and use the option to preserve file permissions.
    After my rsync i see all the files have been given to root.
    What am i doing wrong? All i want is to preserve the users and rights when i rsync across. Any help will be great.

  2. #2
    Join Date
    Aug 2007
    Location
    Germany
    Beans
    45
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: using rsync for backups

    Try the options "-o" and "-g".

  3. #3
    Join Date
    Nov 2008
    Beans
    50

    Re: using rsync for backups

    Quote Originally Posted by nbkr View Post
    Try the options "-o" and "-g".
    OK i re-read the manual and yes -o -g could be the solution.
    So far... looks good but will have to wait till sometime tomorrow as am backing up a 3TB server. Scary.....
    Thanks dude

  4. #4
    Join Date
    Jun 2007
    Location
    Oklahoma City, OK
    Beans
    200
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: using rsync for backups

    the -a option is somewhat analagous to cp's -a option and will also do what you want.

    check rsync's man page for more information.
    Te audire no possum. Musa sapientum fixa est in aure.

  5. #5
    Join Date
    Aug 2006
    Beans
    304
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: using rsync for backups

    Mystic-Boa - RSS Feed Downloader (https://launchpad.net/mystic-boa)
    Linux Documentation (http://www.google.com/notebook/publi...zTSwoQtNGpob4i)

  6. #6
    Join Date
    Jun 2006
    Location
    Melbourne, Australia
    Beans
    265
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: using rsync for backups

    I feel I ought to point out that rsync != backup. If your disaster recovery solution is built entirely around rsync then you should probably prepare yourself for the worst some time down the track.

  7. #7
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: using rsync for backups

    Quote Originally Posted by brettg View Post
    I feel I ought to point out that rsync != backup. If your disaster recovery solution is built entirely around rsync then you should probably prepare yourself for the worst some time down the track.
    Really? How so?

    A copy of yer data is a copy of yer data, right?

    Sidenote: To use the -a switch (and preserve permissions), you need to run it with sudo or in a root cronjob.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  8. #8
    Join Date
    Oct 2006
    Location
    Seattle, WA
    Beans
    59
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: using rsync for backups

    Quote Originally Posted by CharlesA View Post
    Really? How so?

    A copy of yer data is a copy of yer data, right?
    I think the idea is that rsync can protect you from hardware failure, since you can restore to your most recent rsync, however if you delete a file and run rsync you still don't have a backup of the file.

    With a "proper" backup solution you could restore the file from last week, two weeks ago, a month ago etc etc depending on your backup schedule/scheme.

    Look at rdiff-backup for a backup solution that uses rsync's principals of only working on what has changed. I've not used it much but it seems easy to use and well liked in the community.

  9. #9
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: using rsync for backups

    Quote Originally Posted by Plecebo View Post
    I think the idea is that rsync can protect you from hardware failure, since you can restore to your most recent rsync, however if you delete a file and run rsync you still don't have a backup of the file.

    With a "proper" backup solution you could restore the file from last week, two weeks ago, a month ago etc etc depending on your backup schedule/scheme.

    Look at rdiff-backup for a backup solution that uses rsync's principals of only working on what has changed. I've not used it much but it seems easy to use and well liked in the community.
    That makes sense. I do daily backups using cp -al and rsync, that way I have backups of files that are changed/deleted, in case I need to go back to a previous version.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  10. #10
    Join Date
    Jun 2007
    Location
    Oklahoma City, OK
    Beans
    200
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: using rsync for backups

    Quote Originally Posted by brettg View Post
    I feel I ought to point out that rsync != backup. If your disaster recovery solution is built entirely around rsync then you should probably prepare yourself for the worst some time down the track.
    I can boot an rsync'ed root partition in a VM in minutes. What exactly is horrible about that?

    rsync over to a new directory every time and have fslint dedup with hard links. throw in a copy of sfdisk's output and you have what you need to put it back down.
    (BackupPC would work better though)
    Te audire no possum. Musa sapientum fixa est in aure.

Page 1 of 6 123 ... LastLast

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
  •