Results 1 to 6 of 6

Thread: rsync questions

  1. #1
    upscope NNTP User

    Default rsync questions

    I am trying to backup my home directory. command I am using for first
    time is:rysync -axz /home/* /media/Backup11.2/Production/

    is this correct command?

    Backup11.2 is a 1TB MyBook external drive, usb. Before backing up I
    copy /boot to home and also backup mysql. All goes well until it tries
    backing up /boot (I am running as user). It gives permission denied on
    some /boot files,etc.

    I thought rysnc did not worry about permission or did I miss
    understand the man page about "support for copying links,
    devices,owners, groups, and permissions". I tried running as root and
    it changed the permissions of folders like Documents, Download, Music
    and Video to be owned by root:root on the backup media. I thought
    rsync would handle the user permissions, etc correctly.

    It says in the man pages "does not require super user privileges".

    Do I need to tell the command to preserve these parameters uniquely
    with the options?

    Hope I'm not a pain. I can back up all of /home except stuff owned by
    root as user. trying to do backup before kernel update.

    Thanks in advance for any pointers.

    --
    Russ
    openSUSE 11.2 (2.6.31.5-0.1-desktop, x86_64) KDE 4.3.4 release 2,
    Intel Core 2 Dual E7200, 4 GB RAM, GeForce 8400 GS, 320GB Disc (2)

  2. #2
    Join Date
    Jan 2009
    Location
    Switzerland
    Posts
    1,529

    Default Re: rsync questions

    rsync does not *necessarily* need root privileges, but you are backing up files owned by root and this needs root privileges to write them (as root).
    Technology is 'stuff that doesn't work yet.' -- Bran Ferren

  3. #3
    palladium NNTP User

    Default Re: rsync questions

    vodoo wrote:
    > rsync does not *necessarily* need root privileges, but you are backing
    > up files owned by root and this needs root privileges to write them (as
    > root).


    correct...upscope you can solve that by wrapping up boot in a archive
    (tar, zip, whatever) which you *do* own...then rsync can access it..

    hmmm, since you are 'zipping' root owned stuff i guess you may have to
    run the archiver as sudo (i've not looked at compressors lately---been
    years since drives were so expensive!), and then chown the
    tarball/whatever so it *is* yours (so rsync can read it)..

    and, don't forget the great truth: you do not have a backup until you
    have proved (to yourself) that what you have safely tucked away *can*
    be used to restore.


    --
    palladium

  4. #4
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    858

    Default Re: rsync questions

    Quote Originally Posted by palladium View Post
    hmmm, since you are 'zipping' root owned stuff i guess you may have to
    run the archiver as sudo
    Yep. Think about it: if anyone could go onto my machine and "tar," "rsync" or "cp" my root directory as an unprivileged user, they could simply move the copy to a different machine and then get access to all of those files. That would sort of defeat the whole purpose of ownerships and permissions.

    To the original poster: whether you're using rsync, cp, or any other program, permissions are permissions. Rsync doesn't need to be *run* as the superuser, but if you ask it to copy a file that is *owned* by (and limited to) the superuser, you must *be* the superuser before that can be permitted. Otherwise, see what I just said.

    and, don't forget the great truth: you do not have a backup until you
    have proved (to yourself) that what you have safely tucked away *can*
    be used to restore.
    Truer words have never been spoken. The only feeling that's worse than seeing your hard drive fail is reaching for the backup and realizing that it can't be restored to the new hard drive!

  5. #5
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,760

    Default Re: rsync questions

    Long ago I had a customer that backed to tape. Every day they dutifully ran the backup for years to the same tape

    The tape was useless

  6. #6
    upscope NNTP User

    Default Re: rsync questions

    upscope wrote:

    <snip>
    > I am trying to backup my home directory. command I am using for
    > first time is:rysync -axz /home/* /media/Backup11.2/Production/
    >
    > is this correct command?
    >


    >
    > Thanks in advance for any pointers.

    </snip>
    Thanks for all the responses. I think the easiest way is to do two
    backups, ~home and the /Boot as root. Only want /Boot for reference in
    case update of kernel or system goes bad.
    --
    Russ
    [openSUSE 11.2 (2.6.31.5-0.1-desktop, x86_64] KDE 4.3.4 release 2,
    Intel Core 2 Dual E7200, 4 GB RAM, GeForce 8400 GS, 320GB Disc (2)

Posting Permissions

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