<html><head></head><body><div>On Mon, 2016-02-29 at 16:43 -0500, Derek Atkins wrote:</div><blockquote type="cite"><pre>Hi Jim,
On Mon, February 29, 2016 4:19 pm, Jim Kinney wrote:
<blockquote type="cite">
On Mon, 2016-02-29 at 15:52 -0500, Derek Atkins wrote:
<blockquote type="cite">
In terms of your package lists, do you just do the equivalent of "rpm
-qa
<blockquote type="cite">
sort > /root/package-list" when the backup begins (or perhaps at a
daily
</blockquote>
cron job)? Or do you do something... different?
</blockquote></blockquote></pre></blockquote><div><br></div><div><br></div><blockquote type="cite"><pre><blockquote type="cite">
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.
</blockquote>
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).
</pre></blockquote><div><br></div><div>Either works. You can also backup /var/log/yum.log and get the update history as well.</div><blockquote type="cite"><pre>
<blockquote type="cite">
<blockquote type="cite">
Do you exclude e.g. the RPM (or apt) package directory/database? Or do
you exclude all of /var/lib?
</blockquote>
No. A disaster restore is a fresh install plus recovery of config files
and user/system data. Let rpm "do it's thing".
</blockquote>
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.
</pre></blockquote><div><br></div><div>All of those are "system data". Maybe service data would be a better name. Basically, if a machine runs a service that generates or stores files of any type, back up that area.</div><div><br></div><div>Databases require special care and feeding. Some are small enough that a dump is sufficient. Others are too large for that and you have to use DB-specific methods/tools to backup them up live. There's a point above which backups are not feasible and you have to rely on drive arrays and data redundancy. </div><blockquote type="cite"><pre>
<blockquote type="cite">
<blockquote type="cite">
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?
</blockquote>
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.
</blockquote>
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.
</pre></blockquote><div><br></div><div>I only let users install in their home dir. I only install custom scripts in /usr/local. As much as possible, I want /bin, /usr/bin, /sbin, /usr/sbin to be installed from a a DVD and/or updated packages with SHA sums and managed by rpm/yum/dnf.</div><blockquote type="cite"><pre>
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?
</pre></blockquote><div><br></div><div>/usr/local is where locally compiled stuff should be installed. Ideally, it should also be it's own partition.</div><blockquote type="cite"><pre>
Thanks, all!!
-derek
</pre></blockquote><div><span><pre>--
James P. Kinney III
Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain
http://heretothereideas.blogspot.com/
</pre></span></div></body></html>