View Full Version : Backing up entire server...
schoeps
2004-08-29, 14:42 PM
I have only found a way to backup the individual domains, is there a one step way to backup the entire server (and databases) and download them? I am using plesk...
Thanks folks!
Bri
BlackNet
2004-08-29, 16:40 PM
Hello,
rsync works wonders in this area. for my config files i run a tar cronjob on a weekly basis and rsync that. for the actual webservers i rsync it daily.
Ed
schoeps
2004-08-29, 18:04 PM
Originally posted by BlackNet
Hello,
rsync works wonders in this area. for my config files i run a tar cronjob on a weekly basis and rsync that. for the actual webservers i rsync it daily.
Ed
is this a script I could run? I am looking for something simple! Also, where are the physical MySQL databases stored?
Thanks so much from a total knewb...
Bri
BlackNet
2004-08-29, 18:37 PM
Hello,
For the mysql stuff.
#mysql dump
00 * * * * /usr/bin/mysqldump --all-databases --password=****** > /path/to/backup/mysql.dump.sql
that will dump everyday at midnight.
rsync is just as simple, once you do the server side config on the remote side it's something like this
#abyss backups
@hourly rsync -zart --delete abyss.simplyaquatics.com::sharepath/ /path/to/archives/abyss > /dev/null
Hope this helps.
Ed
schoeps
2004-08-29, 22:08 PM
I guess all I really need to bakup is the httpd folder, whatever you typed above is way over my head. :P oh well. Thanks for your patience! :)
Bri
schoeps
2004-08-30, 00:41 AM
would it make sense to just SCP in, tar the home dir and download it?
rushman
2004-08-30, 08:14 AM
That would work, unless you have disk space issues. Another cool thing you can do is something like the following, just check the actual syntax, as this is off the top of my head, its too early to go digging.
tar xvfz - /home | ssh -e yourhost.com "dd /backup/backup.tgz"
Again, there are more flags needed for dd and scp, but basically what this does is tars and zips /home, and writes that to stdout. stdout is then piped to sssh -e, which executes the command dd which writes stdout from before to /backup/backup.tgz .
Or use rsync to only backup modified files.
schoeps
2004-08-30, 09:45 AM
Originally posted by rushman
That would work, unless you have disk space issues. Another cool thing you can do is something like the following, just check the actual syntax, as this is off the top of my head, its too early to go digging.
tar xvfz - /home | ssh -e yourhost.com "dd /backup/backup.tgz"
Again, there are more flags needed for dd and scp, but basically what this does is tars and zips /home, and writes that to stdout. stdout is then piped to sssh -e, which executes the command dd which writes stdout from before to /backup/backup.tgz .
Or use rsync to only backup modified files.
You guys are awesome, thanks for hanging in there with me :) I am loving my serverbeach server! One thing tho, I dont have access to the httpd folders when I login! I need to figure out how to setup a user with access to that. Also, anyone know where the adatabases are stored?
Thanks I really apprecitate your help...
Bri
rushman
2004-08-30, 19:04 PM
You will need to use "su -" to log in as root. Here is the command I used to use, apache folder is the example
tar -zpcf - /usr/local/apache | /usr/bin/ssh -i /home/myusername/.ssh/id_rsa myusername
f@myfileserver.com "(cd remotebackupfolder; dd of=apache.tgz)"
So we tar and zip over ssh, and use dd to write it out to apache.tgz on the remote server. You will need to set up an rsa key pair between the 2 servers so you don't need to enter a password.
schoeps
2004-08-30, 23:12 PM
you guys blow my mind. :) Thanks!
I think what you are looking for is something like webmin which has a nice gui interface and will do full backups. I'd be happy helping you get this rolling as I have just installed it myself!
t
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.