LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-30-2006, 04:15 PM   #1
mwildam
Member
 
Registered: Sep 2006
Location: Vienna, Austria
Distribution: Fedora 13, Ubuntu 10.04
Posts: 52

Rep: Reputation: 15
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.
 
Old 09-30-2006, 04:59 PM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
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.
 
Old 09-30-2006, 05:12 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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.

Last edited by haertig; 09-30-2006 at 05:15 PM.
 
Old 10-01-2006, 02:49 AM   #4
mwildam
Member
 
Registered: Sep 2006
Location: Vienna, Austria
Distribution: Fedora 13, Ubuntu 10.04
Posts: 52

Original Poster
Rep: Reputation: 15
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?
 
Old 10-01-2006, 09:42 AM   #5
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
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.
 
Old 10-01-2006, 09:45 AM   #6
mwildam
Member
 
Registered: Sep 2006
Location: Vienna, Austria
Distribution: Fedora 13, Ubuntu 10.04
Posts: 52

Original Poster
Rep: Reputation: 15
But how are locked files handled? Aren't there some system files being locked?
 
Old 10-01-2006, 09:50 AM   #7
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
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.
 
Old 10-01-2006, 10:04 AM   #8
mwildam
Member
 
Registered: Sep 2006
Location: Vienna, Austria
Distribution: Fedora 13, Ubuntu 10.04
Posts: 52

Original Poster
Rep: Reputation: 15
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.
 
Old 10-01-2006, 02:13 PM   #9
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System Backup seelk Linux - Software 3 06-01-2006 10:11 PM
system backup JROCK1980 Linux - Software 3 07-08-2004 03:56 AM
System Backup linuxtom Linux - General 2 09-17-2003 10:28 AM
System backup. ETeria Linux - Newbie 6 04-10-2003 09:14 AM
System backup berry Linux - General 6 06-21-2002 02:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration