Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to setup a backup with rsnapshot, but currently I don't know what particularly I should backup?

I mean should I backup my data ONLY like:

/var/www
/home2/ftpdirs
/etc/httpd/hosts/
/var/lib/mysql/
...

Or I don't need to think much about it and simply backup starting from /? So the whole system would be backed up?

So my choise is:

A) The whole system
B) Only content(mails/databases/hosts/...)

Update 1

I use only MyIsam tables. Would it be reasonable to simply copy database files or better use mysqldump?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

If this is for a work environment definitely back up the whole server. Backing up a subset means that someday something will change, you will miss updating the backup policies, and no one will realize it until you go to restore the system.

If this is for a home system it may not seem as important but I'd still backup the entire system. Storage space is inexpensive, far cheaper than the value of your free time used up recreating all your custom tweaks after a incident.

Update to cover mysql question:

I would use mysqldump as, unlike a simple copy of the files, its backups are actually the sql statements needed to rebuild and populate the database. This gives you a backup that is not only easy to restore into a new mysql instance but could also be ported to restore in other database systems if needed.

share|improve this answer
    
Seconded on the mysqldump, +1. –  nerdwaller Feb 14 '13 at 13:40
    
Yeah it seems clear for mysqldump, but i am not yet decided for filesystem. –  Jevgeni Smirnov Feb 14 '13 at 13:45
    
I'v tested the whole system backup. It seems as the whole system onstie backup isn't good idea at all. Takes too long and too much space. –  Jevgeni Smirnov Feb 15 '13 at 7:46
    
If you're not going to do full system backups then I suggest adopting a policy where the default is to backup everything and then provide a list of excluded directories. I've seen too many cases where a selective backup policy has failed due to changes in the system that were missed in the backups. If you default to backuping up everything and you forget to exclude something like the /bin directory all you've lost is a bit of time and space to the backups. Better that than needing to tell someone their data is gone because the backups were wrong. –  James Thompson Feb 15 '13 at 13:18
add comment

How do you plan to restore your backups?

If you have a catastrophic failure (lightning destroys your server), are you going to set up a basic installation from (e.g. DVD) and then restore your backup? Then I would suggest data only, and follow the mysqldump advice.

If you use tools like Mondo Rescue which create bootable restore images, then you can rebuild the entire system as it was (think Norton Ghost), and it's like nothing happened in the mean time. Mondo restore rebuilds the system back to the same state is was when you ran the backup. Then you don't have to worry about choosing - it backs up the entire system.

share|improve this answer
    
Yeah. Seems a good point. In general for start I will use rsnapshot. I Think I will try to backup the whole system at first, to at least test and watch for caveats. Your link for mondo rescue also very useful it might be that I will switch to it in future. Thank you. –  Jevgeni Smirnov Feb 14 '13 at 14:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.