Find the answer to your Linux question:
Results 1 to 9 of 9
I have 2 FC4 servers and am wanting one to act as a back-up to the other. I need it to maintain the same users, mail and some directorys, does ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Nov 2004
    Location
    Glacier, WA
    Posts
    103

    Back-up Server


    I have 2 FC4 servers and am wanting one to act as a back-up to the other. I need it to maintain the same users, mail and some directorys, does anyone know what I can do other than do it manualy?

    Bill

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    When you say "back-up" do you mean a cold spare that could be synced with its prod counterpart nightly?

    If so, you might like to try rsync over ssh. You could sync the /home, /var/spool/mail, etc. directories as a nightly cronjob.

  3. #3
    Linux Newbie
    Join Date
    Nov 2004
    Location
    Glacier, WA
    Posts
    103
    Yes, the idea is if a server fails that all the settings (user accounts, groups, mail, websites, etc) will be backed up every X hours to a second server then is the primary fails they back-up can be braught online untill I get the primary repaired.

    Bill

  4. #4
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    rsync would be a reasonable choice, then.

    Make yourself a checklist of things that need to happen when bringing the backup online, and test it regularly.

  5. #5
    Linux Newbie
    Join Date
    Nov 2004
    Location
    Glacier, WA
    Posts
    103
    I have tested it and it works, Thanks, but a few more questions if I may. I tested the line 'rsync -a -e ssh /home/ shuksan:/home/' and that worked great, but when I add the --password-file=/sbin/.sid 'rsync --password-file=/sbin/.sid -a -e ssh /home/ shuksan:/home/' it still prompts me for a password. In the .sid file I have tried just the pswd and rootswd Any ideas? And lastly, how do I sync the users and groups?

    Bil
    GlacierBill

    To stop learning is to stop living

  6. #6
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    I actually haven't used rsync with a --password-file, but the rsync man pages specify that this option is only to be used when you're running an rsync daemon (and not using a shell transport).

    As a good alternative, I'd suggest setting up pubkey authentication (with no passphrase) for sshd on the backup server.

    Off the top of my head, to sync users and groups you'll need:
    • /etc/passwd
    • /etc/shadow
    • /etc/group
    • /home


    Might be some others I am forgetting (e.g. user cronjobs).. When you test all this hopefully it will be clear if anything is missing.

  7. #7
    Linux Newbie
    Join Date
    Nov 2004
    Location
    Glacier, WA
    Posts
    103
    I tried setting up a public key but it fails, it still asks for a password, does the syntax of the rsync command change?
    GlacierBill

    To stop learning is to stop living

  8. #8
    Linux Newbie
    Join Date
    Nov 2004
    Location
    Glacier, WA
    Posts
    103
    Got it, I re-built my keys and it worked, many thanks for the help

    Bill
    GlacierBill

    To stop learning is to stop living

  9. #9
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    The way to test that pubkey authentication is working is with a regular ssh login (don't worry about rsync for now -- it's syntax won't need to change).

    Although it's a separate issue from what you started this thread with, what steps did you follow to setup pubkey authentication?

Posting Permissions

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