LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-01-2003, 09:17 PM   #1
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
Backing up the whole system...


Hello, I would like to backup the whole filesystem of linux(Slackware 9.1) which is in /dev/hda3 to a partition on another hard drive, /dev/hdb1 which has plenty of free space. What is the best way to do this? I would like to preserve the user and permission information of the files. And if possible can be restored easily without much trouble. I have a plan in mind but I am not sure whether it works or not. The plan is like this:

1. Use tar or cpio(I dunno how to use cpio) to backup everything on /dev/hda3 to a big file on /dev/hdb1.
2. If anything happens, I will just have to format /dev/hda3 and restore the backup.

Please correct me if I missed out something. And please warn me if there is anything important I should take care of. And please redirect me if you know of any good material on the web where I can read up.

Thanks.
 
Old 10-01-2003, 09:32 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
if you do this when the system being backed up is running or from the system being backed up then you want to omit /proc
 
Old 10-01-2003, 09:38 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
I have been backing everything up to a spare partition like you want to do for over two years using cpbk. I highly recommend cpbk:

http://www.icewalkers.com/Linux/Soft...ckup-Copy.html


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 10-01-2003, 10:08 PM   #4
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
Thanks for your fast replies.

I am interested in this cpbk but when I try to download the source from the above link, it shows me a page with some korean language on it... and definitely I don't know korean.... There is this similar project in SourceForge.net but there are no files released, too. Is this project already dead?

Looking for other programs...
 
Old 10-01-2003, 10:12 PM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I've been using tar for years
 
Old 10-01-2003, 10:19 PM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
"Is this project already dead?"

No. Here is another link where you can get the source tarball.

http://packages.debian.org/stable/utils/cpbk.html

Also there is a copy of cpbk in LifeBoat.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 10-02-2003, 03:22 AM   #7
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
Thanks jailbait! Now I have got the tar ball and a diff file. Just want to make sure if this is the correct way to use the diff file.

In the directory of cpbk-4.1.0, run "$ gunzip cpbk_4.1.0-3.1.diff.gz | patch -p1".

Is the above the correct step to patch the source?
 
Old 10-02-2003, 09:59 AM   #8
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
"Is the above the correct step to patch the source?"

I am not sure about the -p1. That may need to be -p0.

In any case I obtained cp-4.1.0 before the patch was available and I have been running it with no problems without the patch.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 10-02-2003, 10:58 AM   #9
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
Anyway I applied the patch with the -p1 option and the patching process seemed successful to me. And I installed cpbk without any problems, too.

However, when I run cpbk, it worked normally for the first time, copying all the files from the root directory to the destination directory. But when I ran it for the second time right after the first backup, it tried to re-copy all the files instead of updating new files(which aren't supposed to exist at all) and it gave me the following message:
-----------------------------------------------------------------------------------
root@localhost:/mnt/linux/BACKUP# cpbk -t TRASH/ -e "/mnt/,/proc/" / BACKUP/
Searching source files and building lists... Done
Searching destination files and building lists... Done
Comparing files and generating order lists... Done

0/202507 files ( 0KB/2515911KB) 0% [--------------------] Making
mkdir: File exists
Cannot make directory `/mnt/linux/BACKUP/BACKUP/bin'.
------------------------------------------------------------------------------------
One problem that I can think of is that the timestamp changed during the first backup. This is the result of ls -l on both the root and the destination directory right after the first backup.

root:
-------------------------------------------------------------------------------------
root@localhost:/mnt/linux/BACKUP# ls -l /
total 82
drwxr-xr-x 2 root bin 2416 Oct 2 07:00 bin
drwxr-xr-x 2 root root 336 Oct 1 22:46 boot
drwxr-xr-x 15 root root 62328 Oct 3 00:24 dev
drwxr-xr-x 46 root root 4688 Oct 3 00:24 etc
drwxr-xr-x 4 root root 96 Oct 1 22:29 home
drwxr-xr-x 4 root root 2592 Oct 2 06:59 lib
drwxr-xr-x 9 root root 216 Oct 1 23:46 mnt
drwxr-xr-x 4 root root 96 Dec 14 2002 opt
dr-xr-xr-x 64 root root 0 Oct 3 2003 proc
drwx--x--- 3 root root 168 Oct 1 22:48 root
drwxr-xr-x 2 root bin 5704 Sep 2 07:29 sbin
drwxrwxrwt 9 root root 296 Oct 3 00:51 tmp
drwxr-xr-x 18 root root 544 Sep 15 07:25 usr
drwxr-xr-x 16 root root 456 Aug 15 12:17 var
------------------------------------------------------------------------------------
destination:
------------------------------------------------------------------------------------
root@localhost:/mnt/linux/BACKUP# ls -l BACKUP/
total 82
drwxr-xr-x 2 root bin 2416 Oct 3 00:29 bin
drwxr-xr-x 2 root root 336 Oct 3 00:29 boot
drwxr-xr-x 15 root root 62328 Oct 3 00:29 dev
drwxr-xr-x 46 root root 4688 Oct 3 00:29 etc
drwxr-xr-x 4 root root 96 Oct 3 00:29 home
drwxr-xr-x 4 root root 2592 Oct 3 00:29 lib
drwxr-xr-x 4 root root 96 Oct 3 00:32 opt
drwx--x--- 3 root root 168 Oct 3 00:32 root
drwxr-xr-x 2 root bin 5704 Oct 3 00:33 sbin
drwxr-xr-t 10 root root 328 Oct 3 00:33 tmp
drwxr-xr-x 18 root root 544 Oct 3 00:40 usr
drwxr-xr-x 16 root root 456 Oct 3 00:40 var
------------------------------------------------------------------------------------
Have you encounter this problem before?

Anyway, thanks for your help!
 
Old 10-02-2003, 11:59 AM   #10
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
" it tried to re-copy all the files instead of updating new files(which aren't supposed to exist at all)"

cpbk has to read all of the directories in both your system and your backup to compare names and time stamps even when it eventually decides that no files need to be copied.


"mkdir: File exists
Cannot make directory `/mnt/linux/BACKUP/BACKUP/bin'."

I do not know why you get this message. I have never seen it or a similar message before.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 10-02-2003, 08:38 PM   #11
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
I have kept trying last night but I still couldn't figure out what was wrong... so... sorry to say this but I have to give up cpbk... and go back to stick with tar...

Thanks for your help, Steve.
 
Old 10-02-2003, 08:53 PM   #12
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
you could also take a look at partimage. It creates a compressed partition image so you can restore a partition to its exact state at the time of backup.
 
Old 10-07-2003, 06:22 AM   #13
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
Yeah, I tried partimage and it is coooool~~~~!!! Easy to use and no installations needed if you get the rescue CD image iso and burn it to a CD

Thanks!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backing up your system? alime Ubuntu 2 05-18-2005 09:06 PM
Backing up for system upgrade ivelgo Fedora 1 12-14-2004 02:37 PM
backing up coheed Linux - Software 4 01-25-2004 09:01 PM
Backing up entire Linux System (partition) podollb Linux - Software 4 10-14-2003 10:01 PM
Backing Up LFS4 Base System nuxie1 Linux From Scratch 7 11-14-2002 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:31 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