[ale] Backup questions -- what to back up?

Derek Atkins derek at ihtfp.com
Mon Feb 29 16:43:05 EST 2016


Hi Jim,

On Mon, February 29, 2016 4:19 pm, Jim Kinney wrote:
> On Mon, 2016-02-29 at 15:52 -0500, Derek Atkins wrote:
>
>> In terms of your package lists, do you just do the equivalent of "rpm
>> -qa
>> >
>> > sort > /root/package-list" when the backup begins (or perhaps at a
>> > daily
>> cron job)?  Or do you do something... different?
> That works just fine. The anaconda install file gets backed up and can
> easily be turned into a new install master kickstart. Add the rpms from
> the rpm -qa list and you're ready to go.

Do you kick the rpm dump from the backup or just a cron job?  I suppose
the package list isn't really modified frequently, so worst case you're
off by a day (if you care about specific versions).

>> Do you exclude e.g. the RPM (or apt) package directory/database?  Or do
>> you exclude all of /var/lib?
>>
>
> No. A disaster restore is a fresh install plus recovery of config files
> and user/system data. Let rpm "do it's thing".

Sure, what what constitutes "user/system data"?  For example, if you're
running a web server, wouldn't you back up /var/www ?  Or for a mail
server, wouldn't you backup the mail spools?

Obviously MySQL is a bit more of a trick, most likely you do need to run a
mysqldump as part of the backup process.

I'm not sure if there is anything special I would need to do to backup a
cyrus DB.

>> Also, how do you handle programs that might not have been installed by
>> the
>> package manager?  Do you install those manually after a restore?  Or do
>> you add them to the backup?
>>
>
> Depends on the complexity. Often those are in the user dirs as src
> files so a 'make install' is all that's needed to put them back. I do
> backup config files so the restore will put those back.
> Think of this way - fasted way back to running for me is a fresh
> install or all packaged goods, restore of system config files (/etc),
> reboot (now machine has correct "personality"), restore user files,
> rerun make install as required, restore custom config files, reboot, go
> home.

I'm more thinking something like "vmware", or possibly user-installed
"scripts" that got installed into /bin.  Although I suppose in that latter
case there is a source file elsewhere that did get "installed", so just
backing up the source (/root) is sufficient.

In summary so far, it sounds like one should backup:

/etc
/root
/home
parts of /var (but not all of /var)
and then extra work for certain server state (e.g. mysqldump).

Am I missing anything?

Thanks, all!!

-derek

-- 
       Derek Atkins                 617-623-3745
       derek at ihtfp.com             www.ihtfp.com
       Computer and Internet Security Consultant



More information about the Ale mailing list