| View previous topic :: View next topic |
| Author |
Message |
pjp Administrator


Joined: 16 Apr 2002 Posts: 16029 Location: Colorado
|
Posted: Wed Sep 21, 2011 3:09 am Post subject: Minimal backup list to recreate (not restore) an install? |
|
|
Here's what I've come up with, excluding one-off stuff like bind or apache. Anything you'd add? | Code: | /boot/config*
/boot/grub/menu.lst
/boot/grub/grub.conf
/etc/conf.d/
/etc/exports
/etc/fstab
/etc/group
/etc/hosts
/etc/lvm/lvm.conf
/etc/make.conf
/etc/mdadm.conf
/etc/mdev.conf
/etc/passwd
/etc/portage/
/etc/resolv.conf
/etc/rsyncd.conf
/etc/screenrc
/etc/shadow
/etc/ssh/
/etc/sudoers
/root/
/var/lib/portage/world |
_________________ lolgov. 'cause where we're going, you don't have civil liberties.
In Loving Memory
1787 - 2008 |
|
| Back to top |
|
 |
palmer Guru


Joined: 17 Nov 2004 Posts: 320 Location: Berkeley, CA
|
Posted: Wed Sep 21, 2011 5:08 am Post subject: |
|
|
I guess a bit of this depends on what you have installed, but some of these can be really tricky to get working how you want them (audio stuff in particular, depending on how complicated your setup is). I would backup all of these, in addition to your stuff
| Code: | /etc/X11/
/usr/src/linux/.config
/usr/local/portage/
/etc/pulse/
/etc/asound.conf
/etc/samba/
/etc/sysctl.conf
iptables-save
/var/spool/torque/
/var/spool/cron/
/usr/spool/maui/
/etc/dnsmasq.conf |
It might be safer just to tar up all of /etc/, as it can really be a pain to lose something and /etc/ is pretty small.
If you can get away with it, I always make a 2nd partition whenever I install gentoo on the disk that holds my root fs (it's only about 20G for me, so it's pretty much free with disks being so big now) and then just save everything until I verify the reinstall works. You could probably get a similar effect by just dd'ing your root fs to another drive. |
|
| Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 16029 Location: Colorado
|
Posted: Fri Sep 23, 2011 3:31 am Post subject: |
|
|
Thanks, good suggestions. My /boot/config* includes all of my /usr/src/linux/.config files. I copy them to boot with matching kernel & System.map (though I honestly don't know what the map does).
And you're right about /etc, so I'll probably just grab all of it. sysctl.conf & cron are the things I had in mind (though I don't have anything in cron currently). /usr/local is good too. I'll have to review that as I've put some scripts there on some systems.
What I'm doing this for is a handful of VMs I've been playing with. By now I think they've fallen behind without an sync and update for months. I'm also looking to install CentOS to get familiar with it, but I want to be able to recreate the VMs without too much effort. I'm going to try keeping the disk files, but just in case, I want an extra minimum backup of the configs. One is a DNS setup, another mail, and a couple of others. In fact, I may set them up again after I get CentOS going.
Thanks for the input! _________________ lolgov. 'cause where we're going, you don't have civil liberties.
In Loving Memory
1787 - 2008 |
|
| Back to top |
|
 |
palmer Guru


Joined: 17 Nov 2004 Posts: 320 Location: Berkeley, CA
|
Posted: Fri Sep 23, 2011 2:03 pm Post subject: |
|
|
| pjp wrote: | | Thanks, good suggestions. My /boot/config* includes all of my /usr/src/linux/.config files. I copy them to boot with matching kernel & System.map (though I honestly don't know what the map does). |
I didn't either
http://en.wikipedia.org/wiki/System.map
Looks like it's the kernel's debug info.
| pjp wrote: | | And you're right about /etc, so I'll probably just grab all of it. sysctl.conf & cron are the things I had in mind (though I don't have anything in cron currently). /usr/local is good too. I'll have to review that as I've put some scripts there on some systems. |
I've recently started keeping all my scripts in "/usr/local/src/scripts/" inside a git and then "make install"ing them over to "/usr/local/bin/", because I was so frusturated at always forgetting to back them up :)
git is nice for this kind of thing because you just need SSH access (no sort of daemon or special permissions). You can also set up gitolite to give access for non-shell users, which is useful.
| pjp wrote: | | What I'm doing this for is a handful of VMs I've been playing with. By now I think they've fallen behind without an sync and update for months. I'm also looking to install CentOS to get familiar with it, but I want to be able to recreate the VMs without too much effort. I'm going to try keeping the disk files, but just in case, I want an extra minimum backup of the configs. One is a DNS setup, another mail, and a couple of others. In fact, I may set them up again after I get CentOS going. |
If you're in a VM you could always just clone a disk image and then go for the update, maybe everything will just work!
Also, I'd be careful with CentOS. We use it at work and everything is quite horribly out of date (though I have heard they released a new version recently). Specifically, their evolution doesn't support push, terminal doesn't support mouse wheels, and their emacs doesn't have XFT for decent fonts.
Good luck, though! |
|
| Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 16029 Location: Colorado
|
Posted: Fri Sep 23, 2011 11:01 pm Post subject: |
|
|
git is a bit heavy for me, though I may eventually get there, but I do need to be a little more organized... makes for easy backups & copying to other servers.
The VMs are kvm/qemu with CLI (no GUI), so I'm not sure how to do cloning. They're also mainly just learning VMs. I'd just like to keep the work so I don't have to start from scratch :)
CentOS is just so I can get familiar with RH since it seems to be the most cited in job requirements. _________________ lolgov. 'cause where we're going, you don't have civil liberties.
In Loving Memory
1787 - 2008 |
|
| Back to top |
|
 |
palmer Guru


Joined: 17 Nov 2004 Posts: 320 Location: Berkeley, CA
|
Posted: Sat Sep 24, 2011 6:25 pm Post subject: |
|
|
You could try using QEMU's disk image helper (qemu-img, IIRC?) to make a new disk that references your current disks and does COW. I know it was at some point supported (because that's how I used to do it), but I haven't used qemu in a year or so. Maybe something like
| Code: | | qemu-img create -b $OLD_IMAGE $NEW_IMAGE |
would work? |
|
| Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 16029 Location: Colorado
|
Posted: Sat Sep 24, 2011 11:15 pm Post subject: |
|
|
Thanks for the tip. I'll check it out when I get back to that part. _________________ lolgov. 'cause where we're going, you don't have civil liberties.
In Loving Memory
1787 - 2008 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|