What should be backed up?

Erik Norgaard norgaard at locolomo.org
Sat Aug 22 13:58:28 UTC 2009


Jeffrey Goldberg wrote:
> On Aug 21, 2009, at 2:33 PM, John Almberg wrote:
> 
>> I am currently using rsnapshot to back up these directories on a  
>> FreeBSD 7.2 webserver:
>>
>> /etc
>> /usr/home
>> /usr/local
>> /var/cron

> Here is my exclude list from my rsnapshot.conf
> 
>   exclude         /var/log
>   exclude         /var/tmp
>   exclude         /usr/obj
>   exclude         /usr/ports/distfiles
>   exclude         /usr/local/squid
> 
> Also I backup by file system, so I'm already excluding /tmp

Yes, it's easy to miss something that should have been backed up. There 
is no point in backup of files other than those you modify yourself, 
unless you plan to create an exact image and recover using dd.

After installation you can do

# date > /tmp/TIMESTAMP

then you can create a list of files that have been modified after that 
time with find,

# find / -newer /tmp/TIMESTAMP > /tmp/backupfilelist

If you have a backup cronjob, then you can use the same method to backup 
only files modified since last backup.

On a base system with no services running, I'd restrict backup to

/etc
/home

If you've got any ports installed, add

/usr/local/etc
/var/db/ports

What else to add to the list really depends on which services you run, 
named, mail, cvs, web, ftp, nis, etc. and if these have critical files 
in other directories.

If you have any databases or ldap service, then you want to add those as 
well, but it is recommended to dump these rather than backup the files 
themselves.

I wouldn't backup source or the ports distribution, you have an online 
backup available :) If you rely on a particular snapshot, then you 
should configure that in your supfiles. But if you need to recover 
without network access you should backup source and the ports tree as 
well as distfiles or build packages whenever you install from ports and 
keep those backed up.

BR, Erik

-- 
Erik Nørgaard
Ph: +34.666334818/+34.915211157                  http://www.locolomo.org


More information about the freebsd-questions mailing list