Jump to content

I Need A Linux Backup Solution


proskater123
 Share

Recommended Posts

So I have two Linux machines. Both running Centos Linux. One is running Plesk and the other I built to be a central backup server. I was reading about rsync but I didn't think rsync ran on the central server and pulled from the different servers out on the internet.

So my final goal is that I want a central backup server that goes out and pulls information off of the servers that are at different locations. I don't want to do full backups of the system either. I just want to backup directorys that I choose. For example one of the directorys would be /var/www/vhosts/ and everything under that.

Would you recommend rsync or would you use something else? What command would you use and why?

Link to comment
Share on other sites

Well, try rsync in combination with ssh.

Mount the remote server's files system using sshfs, then use rsync to copy the files to your local server. Put it all into a nice bash-script that you can run over night using cron.

Yup, that would do the trick.

Link to comment
Share on other sites

either cp + tar or rsync... i prefer rsync cause its faster and can do incremental backups... theres also this totally awesome program that will do snapshotting of linux drives not using LVM called hotcopy... r1soft makes it and distributes it free...

Link to comment
Share on other sites

With rsync is it possible to have my central server go out and pull the files from the servers out on the internet or do the servers that I want backed up have to send there files to the central server?

theres mulitple ways to do this... the easiest way is to use rsync daemon the other way is to stream it over ssh using cron and shell scripts... for speed i would just use the daemon but if you wanted to be real secure about it you could run it from a shell script... and you can either pull or push the files accross rsync supports both methods... for real secure enviroments i usually have a SAN pull the backups from the machines that need to backed up in order to prevent access to the san by the machines... that allows you to run multiple backups on one central SAN without giving the client access to the storage.

Link to comment
Share on other sites

Actually I did find that page. I am currently going through it right now

Edit: So I am very happy to say that I have figured out rsync. I feel like a Linux Genius. :P

But now another question arises. Since I am running Plesk on the machine that I am backing up; what files/ directory should I backup? I am already backing up the /var/www/vhosts folder. But what files mage the dns, the users, the mysql, and anything else. I just want to get it so that if my server ever crashes for any reason, I can have it backup and working the way it was with all the settings and files before.

Thanks for all the help also :D

Edited by proskater123
Link to comment
Share on other sites

try this without quotes. Rsync has be to on both machines. Also if you want to automate this using a shell script then you'll need to create a public/private keypair using ssh in order to do a passwordless login.

"rsync -arz --delete -e ssh bob@someserver.com:/copy/this/directory /copy/to/this/directory"

and if you want to see every file your are copying add a v

like this

"rsync -arzv --delete -e ssh bob@someserver.com:/copy/this/directory /copy/to/this/directory"

and if you want to check how much space the entire copy uses

"du -ch /copy/to/this/directory"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...