| Back Up a Server? Simple steps to bacup a server - Assumptions FreeBSD/Linux - examples given for FreeBSD Server. (Linux would be different set of directories)
Decide on what you want/need backed up.
A typical FreeBSD server, I would back up
/etc
/user/lcoal/etc
/var/cron
/home
/usr/local/www/data
A dump of all databases should be done as well - for MySQL you would do something like
mysqldump --add-drop-table -u {username} - p {password} {dbname} > /backup/{dbname}{date}
Hint - you can easily get a list of all the databases on your server - I'll leave it up to you!
Additionally, I would also make sure I have a backup of the kernel config if you are not using generic and finally, and of couse grab a copy of the list of packages that are on your server ( I do this by running pkg_info > /etc/packge_info as a daily cron job )
Now, we have decided what to back up, you need to actually back it all up - tar and compress it
Use either zip or bz2 compression
tar -czf /backup/etc{date}.tgz /etc for zip compression or
tar -cyf /backup/etc{date}.tbz /etc for bz2 compression
Now, If you have 2 disks in your server, you would have mounted the 2nd drive under /backup
Script all of this and run it as a cronjob daily!
Additionally, I would never rely on simply keeping a backup on the same physical server - At an absolute minimum grab one of these backup sets and ftp it off the server weekly! - Even if you grab it back to your own desktop machine and burn the files to DVD and throw them in the bottom drawer.
As long as you keep any backups on a 2nd physical HDD in your server, you have an easy restore point for the day a customer deletes their data, and the copy in your bottom drawer is for the day the data centre burns down ( or the both Hard drives fail )
This is not a complete set of instructions, but should provide anyone with a bit of an idea on how and what to backup.
The best thing to do, if you don't know how to do a backup is to pay a competent sysadmin to write you some scripts and a simple document on how to use them - It could be the best $50-$100 you ever spend!
Need More Details Please Ask me.
__________________ (Red Pepper)A Microsoft Products Blog with other Technology Updates.
|