LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   System backup possibilities (https://www.linuxquestions.org/questions/linux-software-2/system-backup-possibilities-488311/)

mwildam 09-30-2006 04:15 PM

System backup possibilities
 
I installed my linux workstation and after a lot of troubles I got the most important things to work now finally.

Now I want to backup the complete system.

What I have:
- A DVD writer drive
- A second harddisk of the same type which I bought but
currently not yet put into the computer

I would like to make backups to the second harddisk (which I will do more often) but I also would like to make some offline backup at DVD.

What are the best methods to achieve this? - I am not talking about the working data only (document data produced) which I will backup more often, I am searching for backup for the complete system - so that on a restore the file security is also restored correctly.

tangle 09-30-2006 04:59 PM

I would say the easiest way is using tar (tar cvf /bin /sbin). Tar keeps file perms and such.

For a full backup, backup bin, boot, etc, home, lib, opt, root, sbin, usr and var. I would break them up into like bin, sbin, boot, etc, var - home - usr - opt. Depends if you would like to have smaller files to access. Then compress the files with gzip or bzip.

You could use a command like this to back up file that have only changed for a daily backup.
find / -mtime -1 \! -type d -print > filelist
tar -cv -T filelist -f /mnt/hd/hostname_daily_date.tar
gzip /mnt/hd_daily_date.tar

I have a couple scripts http://www.hclg.org/index.php?option...d=14&Itemid=29.

haertig 09-30-2006 05:12 PM

Here's an example of one of the ways I back things up. There are, of course, about as many different backup methods as there are people!

http://www.linuxquestions.org/questi...d.php?t=484104

Although I illustrated things in one single script in that thread just mentioned, sometimes I do the dd'ing and tar'ing from a seperate Knoppix boot.

mwildam 10-01-2006 02:49 AM

Is this really so easy - simply packing the files?
What about files in use - can they be backup up without problems?
Do I get then a reliable backup status? I mean the backup packing process can last several hours and some system files could then have other status then others not matching a given state.

Sorry if silly questions, but I know only from Windows and there backups are a lot more difficult - There is expensive backup software needed only to be able to backup locked files while the system is running.

And after the thinking about the backup I am also thinking about how a restore would be done. E. g. in HD crash case, would I have to install a minimum base system first and then simply extract the backup packages? - Is this possible?

Is there a possibilty to make a bootable miminum FC5 cd that I can use to boot and then restoring the system from the backup?

tangle 10-01-2006 09:42 AM

Quote:

Originally Posted by mwildam
And after the thinking about the backup I am also thinking about how a restore would be done. E. g. in HD crash case, would I have to install a minimum base system first and then simply extract the backup packages? - Is this possible?

I would if you can not boot it. Then cd / then tar xvfz /package/name.

Quote:

Originally Posted by mwildam
Is there a possibilty to make a bootable miminum FC5 cd that I can use to boot and then restoring the system from the backup?

They have a rescue CD, not sure what it is used for since I never used it. You could just do a minimal install and then restore.

mwildam 10-01-2006 09:45 AM

But how are locked files handled? Aren't there some system files being locked?

tangle 10-01-2006 09:50 AM

Quote:

Originally Posted by mwildam
But how are locked files handled? Aren't there some system files being locked?

I not sure if Linux has them. Maybe Google can find the answer for you.

I just know that if you do what I say you should have a system that is just like it was when you backed it up.

mwildam 10-01-2006 10:04 AM

I found information on the net - e.g. http://en.wikipedia.org/wiki/File_lo...ocking_in_UNIX or http://www.hackinglinuxexposed.com/a.../20030623.html
However, as there is written (summarized) something like "yes there are locks under unix/linux but they can be ignored but there can be set mandatory locks which cannot be ignored" I know as much as before. It looks for me that I can never be sure if I will be able to backup/restore my system completely because there can be a process involved with mandatory locking. :cry:

haertig 10-01-2006 02:13 PM

Previously I said:
Quote:

Although I illustrated things in one single script in that thread just mentioned, sometimes I do the dd'ing and tar'ing from a seperate Knoppix boot.
If you boot from Knoppix, or some other LiveCD, then you don't have to worry about changing files, locks, etc. The only time I think you really have to worry about fast chaning files might be for some large, heavily used database or other such application. But to be sure, just boot a LiveCD to do the backups (this, of course, means taking your system offline - usually fine for a home system - maybe not for a production one).

You also could do your restores from a LiveCD boot. You don't have to first reinstall the OS, unless you want to do that for some other reason. The purpose of backing up /, /boot, /usr, etc. is so that you DON'T have to reinstall the OS.

If you are looking for a "one button restore", like a Symantex Ghost type of thing for Windows, then my suggestions are not that. Your restores would be more manual, requiring some knowledge of your system setup. That's why my backups include things like fdisk output, /etc/fstab, etc.


All times are GMT -5. The time now is 12:23 AM.