The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Backup to off-site server

Discussion in 'General Discussion' started by cretu, Dec 9, 2004.

  1. cretu

    cretu Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    208
    Likes Received:
    0
    Trophy Points:
    16
    Hello there,

    I bought a separate box with OS installed only with purpose of using it as my backup server. I have tried to configured Samba and use rsync to send backups, however, I have problems with Samba.

    Would anyone point a tutorial or best way to quicky and securely configure samba and make connection from off-site box?

    I am also willing to pay someone for help.

    Thank you.

    Cretu
     
  2. sleddog

    sleddog Active Member

    Joined:
    Jun 13, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Labrador, Canada
    Forget about Samba, it's unnecessary and may well introduce security issues. What you want to do is rsync over SSH, using SSH keys on the two machines for authentication (so there's no login prompt).

    In a nutshell you:

    - Install ssh and rsync if they aren't already.
    - Generate the keys on one machine using ssh-keygen.
    - Install (copy) a key to the other machine.
    - Configure rsync, which amount to getting the right rsync command line options (man rsync).

    I don't have a howto handy but there is lots about this on the web. Try some googling with key words like: SSH, rsync, keys, ssh-keygen
     
  3. cretu

    cretu Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    208
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    Thank you for you reply.

    Anyone would know the how-to for this?

    I appritiate it!

    Cretu
     
  4. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    why don't you do as suggested and search for what you want?
     
  5. Harryhood

    Harryhood Well-Known Member

    Joined:
    Jun 3, 2003
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Gamehenge
  6. bazzi

    bazzi Well-Known Member

    Joined:
    May 23, 2004
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Here you have a backup rscync program. You only need to configure it and to configure ssh keys



    Code:
    #/bin/bash
    # Backup to backup server
    DATE=`/bin/date +%Y.%m.%d::%H:%M`
    
    #your server hostname
    HOST="hostname"
    # your user at your backupserver
    BCKUSER="root"
    # The name of hostname/ip of the backupserver
    BCKSERV="backuphostname"
    
    SSH="/usr/bin/ssh -l $BCKUSER $BCKSERV "
    list="/backup/cpbackup/"
    
    rsync -av --delete -e ssh $list $BCKUSER@$BCKSERV:/backup/$HOST
    
     
Loading...

Share This Page