WebBloom
10-17-2001, 12:53 PM
I'm currently learning FreeBSD and I was hoping to get some opinions on backing up the server.
Is the best way to just make a tarball of the entire drive and save this in case of failure?
Any help would be appreciated.
Thanks.
cperciva
10-17-2001, 01:14 PM
If you just want a single snapshot, yes. (After all, tar was originally written as a Tape ARchiver). Of course, if/when you restore from your backup you'll probably want to kill anything inside your mail spool since the spool will either be useless (since any messages would have been sent already) or even invalid (in the case of qmail).
If you're going to be making regular backups (of course you are, right? :angel: ) there's a number of options to consider, ranging from just taking repeated snapshots (meaning you back up lots of unchanging files over and over again) through only archiving files which have changed since the last backup (saves a lot of space), to archiving only the differences between the old files and the new files (saves more space but can get rather messy), or even schemes using error-correcting codes which would allow a complete filesystem to be restored even if some backup tapes are lost.
What you'll probably want to do is make a complete backup using tar every month and then add incremental backups (of all changed files) every few days.
WebBloom
10-17-2001, 01:37 PM
Originally posted by cperciva
What you'll probably want to do is make a complete backup using tar every month and then add incremental backups (of all changed files) every few days.
That sounds like exactly what I would want to do. Would you be able to give me the specifics on how to do this (both the archive and the restore).
Sorry for sounding like a complete newbie on this but I want to make sure that I have everything right.
Thanks
cperciva
10-17-2001, 05:07 PM
Originally posted by WebBloom
That sounds like exactly what I would want to do. Would you be able to give me the specifics on how to do this (both the archive and the restore).
I'm not all that familiar with GNU tar, but I think the "--newer-mtime date" option is the one you want.
In other words, `tar -czf - / | (program which takes standard input and stores on your backup server)` to create your first backup, and then `tar -czf - --newer-time '(insert date last backup was performed)' / | (same program as above)`.
Where are you planning on storing the backups?
WebBloom
10-17-2001, 09:12 PM
Originally posted by cperciva
Where are you planning on storing the backups?
Initially I'll probably just store them on my personal computer but, eventually I'm hoping to have at least two dedicated servers that back each other up.
I'm planning on staying away from backing up the server on a 2nd hard disk on the same server (unless I go with a Raid system).
You may want to investigate into rsync (http://rsync.samba.org) or amanda (http://www.amanda.org)
davidb
10-17-2001, 11:16 PM
Freebsddiary.com
It has a artice(you may have to search a little for it) on backing up to a tape drive. Step by step insructions.