Web Hosting Talk







View Full Version : Back up scripts!


DigiCrime
12-10-2002, 12:18 AM
Are there any backup scripts, good one that anyone can recommend that has a web interface, or something that can be ran from ssh, that backs up certain directories you tell it to or configured it to, or all of the server, that you can restore from?

The Laughing Cow
12-10-2002, 05:26 AM
Is this jsut to backup the files to a tar or to backup and export offsite?

UH-Matt
12-10-2002, 06:33 AM
rsync for server backups.

DigiCrime
12-10-2002, 09:11 AM
Originally posted by The Laughing Cow
Is this jsut to backup the files to a tar or to backup and export offsite?

Both kind of. Need something that will shut down mysql, Check mysql databases and tables fix corrupted databases using myisamchk and isamchk, restart to dump DBs and tar.gz up up user sites, email, configurations, etc etc, and export it to another server for archive/backup reasons, and add it to cron to run this daily or weekly whichever. I found something on forum.rackshack.net but the script needs some work apparently to finish the job.

UH-Matt
12-10-2002, 09:46 AM
hmm i could do with something like this for ensim servers.

The Laughing Cow
12-10-2002, 10:10 AM
It's not really that difficult to make yourself to backup the configuration files, not sure about MySQL or content but I made one to backup all the config files and then it will (when we do it) rsync the tar to a remote server for easy backup.

UH-Matt
12-10-2002, 10:15 AM
i meant the idea of error checking/backing up mysql etc..

A complete backup script for everything that needs it .. would be nice.

So if the server diedcompletely the backup would be good enough to restore from fresh including sites,configs,db's,mail etc. etc..

The Laughing Cow
12-10-2002, 10:23 AM
Ah yes, that's all done seperatly if i recall on our systems.

lotuslnd
12-10-2002, 11:35 AM
Yeah, I've written a simple script that can do something like this. Basically, you have a configuration file on the backup machine (the machine everything's being backed up to), and then it tars data up on the fly and sends it over via ssh (not scp). If you need some help writing one, shoot me a PM.

Mdot
12-10-2002, 11:45 AM
mysqldump -u root -pPASSWORD database > database-`date "+%d.%m.%Y"`.sql && gzip database-`date "+%d.%m.%Y"`.sql
and then rsync it.

Miha.

DigiCrime
12-10-2002, 04:41 PM
Originally posted by UH-Matt
hmm i could do with something like this for ensim servers.

That'd be the one!! The one I have, ehh.. I dont think it works like it should. I think itd be great to have a universal script though, just incase the sever dies.


If you need some help writing one, shoot me a PM.

PM sent