LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   What folders+files to backup for near bare metal restore (https://www.linuxquestions.org/questions/linux-server-73/what-folders-files-to-backup-for-near-bare-metal-restore-545076/)

c_mitulescu 04-11-2007 06:04 AM

What folders+files to backup for near bare metal restore
 
Hi,
One of the servers I look after is a Red Hat Enterprise Linux with LVM and an Oracle DB server. Part of my backup strategy is to do a regular(weekly) backup of the file system by archiving the following folders(contained in a "dirlist" file):

/bin
/boot
/etc
/home
/initrd
/lib
/misc
/opt
/root
/sbin
/selinux
/srv
/tftpboot
/u01
/u02
/usr
/var

and I archive with the following command:
tar czf backupfile.tar.gz -T dirlist

My intention is to be able to do a very fast restore in case of hd failure and the way I would feel comfortable doing it is by first doing a standard Red Hat install and then extracting the filesystem from the archive in order to get all my previous settings back including a working Oracle DB. I have tried using g4l but unfortunately it proved to be unreliable in repeated tests plus I may not bring the server back onto the same hardware( vmware is quite likely).

I am guessing that I should be leaving out a number of files and directories from my archive list such as /etc/fstab, /etc/lvm in order for the backup to be portable.

Can somebody please point out what directories and files I should be leaving out and how I would exclude them in the tar command?
Thank you

frank_abacus 04-11-2007 07:47 AM

I don't have exactly the same requirement, but I do keep backups of a number of systems (mostly Slackware) on a dedicated server.

What I do is use rsync and backup the lot. (This is very quick since rsync only copies the differences) Then if I need to recreate a system I just start with a blank disk, boot from a CD (Slackware or more often Knoppix) and copy the lot from the backup server.

Installing a standard, in your case, Red Hat system isn't necessary and is rather reminiscent of the way you have to do things with Windows.

So long as I restore everything where it was, and can then sort out LILO or GRUB so that it'll boot, I find that everything works. This has got me out of very serious trouble on several occasions!

Remember that disks are cheap these days, and enormous! I use an LVM setup on the backup server, so that it's possible to increase the size relatively simply.

Good luck!

trickykid 04-11-2007 11:40 AM

Bare Metal Restore involves restoring a system from scratch. In most cases unless you have a lot of custom applications and configurations, you only need to backup the essential parts of your system that are configured or installed after the OS is installed.

And as for Oracle DB, I do hope you are shutting down the database during the backup, as simply tarballing will not recover a database to it's normal state when it was backed up running, which could just lead to the whole database corrupt or other missing or corrupt data. You should really be using RMAN if you can't take the system down to perform backups and if that's not an option, you should create downtime to take the backup.

Bare Metal Restore process goes as:

1. Install OS
2. Restore custom applications and configurations from backup.
3. Restore user data.


All times are GMT -5. The time now is 08:54 PM.