Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Easily make a full system backup (stage4)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 15, 16, 17, 18  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
BlinkEye
Veteran
Veteran


Joined: 21 Oct 2003
Posts: 1045
Location: Gentoo Forums

PostPosted: Mon Mar 20, 2006 6:43 am    Post subject: Reply with quote

gnychis wrote:
hi, whenever i run ./mkstage4(unmodified) and do a interactive backup with .tar.gz or .tar.bz2, i get this while trying to extract it:
"Tar: error exit delayed from previous errors"

then it exists, and it never extracts all the files... i've tried making the backup several times and extracting it several times, always the same error right when its about to start extracting /var

anyone else have this problem?

...

I think I once had a file in a tarball which could not be extracted either. Could you do a verbose extracting and tell me where it stops? Let's say you exclude the subfolder where that file resides (just for debugging) - does it work then?
_________________
Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick
Back to top
View user's profile Send private message
booyaa
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2006
Posts: 85

PostPosted: Tue Apr 11, 2006 12:23 am    Post subject: Reply with quote

Guys, I am sure this has been covered, but i would like to ask:

This is an excellent tool.. I used it to successfully back up my system..

Upon restore, I had to recreate partitions (/boot, / , and swap)...

Correct me if I am wrong, but the default grub.conf from the gentoo handbook point the kernetl to HD(0,0)/boot/kernel-xxxxxx

Does the kernel need recompiled and bzImage need recopied to /boot?

Also, a side question, it seems as it my symlink (usr/src/linux was missing.. Anyone experience this?

I really need to get this system back the way it was.. Any help would be appreciated.

Booyaa
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Tue Apr 11, 2006 2:12 am    Post subject: Reply with quote

booya wrote:
Correct me if I am wrong, but the default grub.conf from the gentoo handbook point the kernetl to HD(0,0)/boot/kernel-xxxxxx

Does the kernel need recompiled and bzImage need recopied to /boot?


did you backup /boot? i don't think that was one that is excluded by default in the stage4 script. but, for example, if /boot wasn't mounted when you made the tarball, your kernel is gone.

otherwise, you shouldn't need to recompile the kernel. just in case, you will want to double check your configuration for grub and have it reinstall to your MBR. just in case.

Quote:
Also, a side question, it seems as it my symlink (usr/src/linux was missing.. Anyone experience this?


this is expected if you didn't set the script to backup /usr/src. either way, you should just be able to make the symlink again.
_________________
Sheepdog
Why Risk It? | Samba Howto
Back to top
View user's profile Send private message
booyaa
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2006
Posts: 85

PostPosted: Tue Apr 11, 2006 2:17 am    Post subject: Reply with quote

Thanks Sheep. No I did not back up /boot, nor did I have it mounted when I made the backup.

I recreated my partitions and unzipped stage4 to /

Then reinstalled grub and configured grub.conf..

When rebooting it says file not found: /boot/kernel-2.6.15

Am I hosed? Can I still restore?
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Tue Apr 11, 2006 2:23 am    Post subject: Reply with quote

do you have your kernel sources?

if you still have your original .config file (/usr/src/linux-[version]/.config), you can just recompile the kernel.
_________________
Sheepdog
Why Risk It? | Samba Howto
Back to top
View user's profile Send private message
booyaa
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2006
Posts: 85

PostPosted: Tue Apr 11, 2006 3:44 am    Post subject: Reply with quote

I have this:

/usr/src/linux-gentoo-2.6.15-r1

I can make menuconfig from the lived CD. It gives me the recompile options.

I have recompiled and copied bzImage to /boot, but it still didnt work.

If I copy that to /boot what tells it where to look? Do I need to recreate a symlink? It is hard to believe that If I have a complete backup of / that I cant simply repartition. recompile, and reload grub and edit grub.conf
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Tue Apr 11, 2006 4:25 am    Post subject: Reply with quote

double check your grub settings. mount /boot and make sure it has your kernel there.

come to think of it, you *should* have had the kernel as the stage4 script *does* mount /boot before tarring everything.

odd.
_________________
Sheepdog
Why Risk It? | Samba Howto
Back to top
View user's profile Send private message
booyaa
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2006
Posts: 85

PostPosted: Tue Apr 11, 2006 4:33 am    Post subject: Reply with quote

I know man. I am at this point after my first failure:

I wiped everything.
Booted live CD
Created partitions - file systems
mounted root and boot
cd /
Downloaded the stage 4 tarball
unpacked

I will now emerge sync

Ill then emerge grub and configure grub.conf

Ill then recompile and copy bzImage to /boot-kernel***

Weird cause this is what I thought I did before but grub said it couldnt find my kernel

Dumb noob question: After copying bzImage to /boot/kernel*** , how does the bootloader know where my kernel source is?
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


Joined: 21 Oct 2003
Posts: 1045
Location: Gentoo Forums

PostPosted: Tue Apr 11, 2006 5:29 am    Post subject: Reply with quote

Sheepdogj15 wrote:
double check your grub settings. mount /boot and make sure it has your kernel there.

come to think of it, you *should* have had the kernel as the stage4 script *does* mount /boot before tarring everything.

odd.

yes, it will mount /boot.

booyaa wrote:
I know man. I am at this point after my first failure:

I wiped everything.
Booted live CD
Created partitions - file systems
mounted root and boot
cd /
Downloaded the stage 4 tarball
unpacked

I will now emerge sync

Ill then emerge grub and configure grub.conf

Ill then recompile and copy bzImage to /boot-kernel***

Weird cause this is what I thought I did before but grub said it couldnt find my kernel

Dumb noob question: After copying bzImage to /boot/kernel*** , how does the bootloader know where my kernel source is?

You have to adjust the entry in /boot/grub/grub.conf (kernel line). So, make sure they match names (the entry in /boot/grub/grub.conf and the /boot/KERNELNAME). Creating a new kernel usually means to either add a whole new grub entry block (and adjusting the kernel line appropriately) or copy the new kernel over the old kernel (not suggested).
_________________
Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick
Back to top
View user's profile Send private message
RaZoR1394
Guru
Guru


Joined: 09 Jan 2005
Posts: 356

PostPosted: Tue Apr 11, 2006 4:32 pm    Post subject: Reply with quote

Quote:

Tar: error exit delayed from previous errors


I'm getting this error too somewhere during the extraction of /var/lib.
_________________
http://en.wikipedia.org/wiki/Cell_(microprocessor)
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Wed Apr 12, 2006 6:53 pm    Post subject: Reply with quote

First, thank you for the script. It greatly simplifies my backup process which, unfortunately, I implemented *after* testing the new GUI installer. :(

I used the instructions in the wiki to restore after I wiped and repartitioned my primary drive. (put win2k back on the system for games and some work I'm doing) It worked very well, but I did run into one issue that hasn't been mentioned in this thread, but is found many places in the forums. Every boot into Gentoo after the restore results in warning messages while the init.d scripts run. "Re-caching dependencies (mtimes differ)" or something close to that. Everything worked, but the messages were annoying. From researching the forums, I found that removing /var/lib/init.d/depcache, /var/lib/init.d/deptree, and then running depscan.sh fixed the problem. There were also indications in some posts that re-emerging baselayout would fix the problem, but since I had already used the first method, I can't say if doing that will work. Anyway, I just wanted to make you aware of this, if you weren't already, so that you can add this to the wiki's known issues section.

P.S. I'm going to re-emerge baselayout just to be safe.

P.P.S. I just found that I had to re-create the /var/log/portage directory too. I guess I need to add it to the custom includes section of the script.
Back to top
View user's profile Send private message
booyaa
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2006
Posts: 85

PostPosted: Thu Apr 20, 2006 6:52 pm    Post subject: Reply with quote

OK Guys question:

I got this working cool and I managed to restore a stage 4 with some kernel and grub tweaks..

Now..

Do you guys think this will work if I want to restore to a whole new hardware platform:

restore stage 4/recompile kernel/reinstall and configure grub?

just curious..

If not.. then what is the easiest way to do this?

I basically am running php-syslog-ng on a gentoo box and want to migrate the solution to another box: more resources
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


Joined: 21 Oct 2003
Posts: 1045
Location: Gentoo Forums

PostPosted: Wed Apr 26, 2006 3:02 pm    Post subject: Reply with quote

depending on your CFLAG setting and your CPU change this will work with no problem at all or need (first) a complete re-compile of the system (emerge -e world would be your friend): wiki link
_________________
Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick
Back to top
View user's profile Send private message
simeli
Apprentice
Apprentice


Joined: 15 Jun 2005
Posts: 193
Location: Switzerland, Zurich

PostPosted: Fri Apr 28, 2006 2:20 pm    Post subject: Reply with quote

Has anyone thought of a way to back up using ftp, scp or sftp. I'd like to backup my home server to my other box, but don't have the space needed to store the tarball locally befor transferring it. so being able to pipe the output over directly to the other box would be awesome. Any ideas how this could be done?
_________________
Pentium M 740 on MSI 915GM SPEEDSTER-FA4, 2x512MB Corsair XMS2 DDR2 667 Memory, Zalman CNPS7000B AlCu, Samsung SpinPoint P120 250GB SATAII, Hauppauge WinTV PVR-500, Enermaxx Liberty 400, Antec P180

Husaberg FS650e Force Edition [http://www.husaberg.se]
Back to top
View user's profile Send private message
GetCool
Guru
Guru


Joined: 23 Nov 2003
Posts: 324
Location: Madison, Wisconsin

PostPosted: Sun May 14, 2006 5:09 am    Post subject: Reply with quote

Is anyone else having trouble getting this script to work properly these days?

I've used mkstage4.sh for quite a while now, and it's always worked great, but recently, I'm noticing that it's not backing up some pertinent files. Specifically, it skips over the entire /usr directory, as well as certain subdirectories of my /home/user (which are seemingly chosen randomly).

Note that this is happening on a freshly installed system with an unedited mkstage4.sh. Regardless, I have read all the documentation and am quite familiar with how all the variables work in the script (I have customized it in the past in several different ways), so I'm not inclined to believe it's user error (although I won't rule out that possibility).

Since it worked for me for so long but just recently stopped, I am wondering if some recent package update is causing problems with this script, since the script hasn't been updated in a little while. Since it uses standard linux tools, though, I can't understand why this might be so. I've been through the script many times, trying to logically deduce why it isn't backing up /usr and other dirs, but I can't figure it out.

As I said, this even happens on a freshly installed system with a fresh copy of mkstage4.sh (on amd64, at least). I can post more details and/or due some more testing, if anyone has any insight.
Back to top
View user's profile Send private message
castra
Tux's lil' helper
Tux's lil' helper


Joined: 12 Aug 2003
Posts: 86

PostPosted: Wed Jun 14, 2006 7:23 am    Post subject: Backup error ! Reply with quote

I have issue with backup ( script ) on my PIII machine.
I runed the same script on my main dekstop ( AMD64 ) and there was no problems what so ever so I am preaty sure that
nothing is wrong with it ( added some excluded stuff ).

I get following error:
Quote:

7712 Broken pipe | /bin/tar --bzip2 --preserve-permissions --create --absolute-names --totals --ignore-failed-read --file /disk3/mahdi-stage4-2006.06.13-custom.tar.bz2 --no-recursion -T -

* stage4 is done
* umounting boot
* Checking integrity
* Integrity check failed. Re-run the script and check your hardware.

real 240m16.131s
user 53m49.218s
sys 1m33.970s


As first strage thing that happends on this PC is that backup take so long and second it uses all free space on /disk3 ( 5.9 GB ).


So my Q is how can this be that whole system ( which is 2 GB ) takes more then 6 GB of backup space ?
Back to top
View user's profile Send private message
piwacet
Guru
Guru


Joined: 30 Dec 2004
Posts: 486

PostPosted: Mon Jun 19, 2006 3:21 am    Post subject: Reply with quote

Hi. I'm thinking of making a stage4 based on the wiki, and had a question about the exclude files:

Quote:
stage4.excl contents:

.bash_history
/dev/*
/mnt/*
/tmp/*
/proc/*
/sys/*
/usr/src/*
/usr/portage/*
/path/to/save/at/stage4.tar.bz2


I understand excluding everything except /sys/*. I guess I just don't know what stuff in /sys/ does,

Code:
magenta@Nautilus ~/movies $ ls -l /sys
total 0
drwxr-xr-x  8 root root 0 Jun 18 11:10 block
drwxr-xr-x 12 root root 0 Jun 18 11:11 bus
drwxr-xr-x 23 root root 0 Jun 18 11:10 class
drwxr-xr-x  6 root root 0 Jun 18 11:10 devices
drwxr-xr-x  3 root root 0 Jun 18 11:10 firmware
drwxr-xr-x  2 root root 0 Jun 18 11:10 fs
drwxr-xr-x  2 root root 0 Jun 18 11:10 kernel
drwxr-xr-x 43 root root 0 Jun 18 11:11 module
drwxr-xr-x  2 root root 0 Jun 18 11:10 power
magenta@Nautilus ~/movies $


Is that stuff automatically created at boot and therefore not necessary to back up?

TIA!
Back to top
View user's profile Send private message
GetCool
Guru
Guru


Joined: 23 Nov 2003
Posts: 324
Location: Madison, Wisconsin

PostPosted: Mon Jun 19, 2006 4:24 pm    Post subject: Reply with quote

piwacet wrote:
I understand excluding everything except /sys/*. I guess I just don't know what stuff in /sys/ does


/sys is a pseudo filesystem, just like /proc. As such, it should not be backed up.

Interestingly, it is not listed in the FHS. My understanding is that it is fairly new (as of 2.6, possibly).
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


Joined: 21 Oct 2003
Posts: 1045
Location: Gentoo Forums

PostPosted: Thu Jun 22, 2006 1:10 pm    Post subject: Re: Backup error ! Reply with quote

castra wrote:
I have issue with backup ( script ) on my PIII machine.
I runed the same script on my main dekstop ( AMD64 ) and there was no problems what so ever so I am preaty sure that
nothing is wrong with it ( added some excluded stuff ).

I get following error:
Quote:

7712 Broken pipe | /bin/tar --bzip2 --preserve-permissions --create --absolute-names --totals --ignore-failed-read --file /disk3/mahdi-stage4-2006.06.13-custom.tar.bz2 --no-recursion -T -

* stage4 is done
* umounting boot
* Checking integrity
* Integrity check failed. Re-run the script and check your hardware.

real 240m16.131s
user 53m49.218s
sys 1m33.970s


As first strage thing that happends on this PC is that backup take so long and second it uses all free space on /disk3 ( 5.9 GB ).


So my Q is how can this be that whole system ( which is 2 GB ) takes more then 6 GB of backup space ?


Hmm, this broken pipe issue has been seen before. Could you re-download the script and try with a unmodified version? It usually happens while cutting & pasting the code (please use wget to get the script).
_________________
Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick
Back to top
View user's profile Send private message
fkamp
n00b
n00b


Joined: 21 May 2006
Posts: 6

PostPosted: Sat Jul 01, 2006 12:36 am    Post subject: why not? Reply with quote

Hi,

Thanks for a great script. This sure beats ghosting!

I have a question. Why not backup all of /usr/src/linux by default?
Is there a reason to only backup .config?
Seems like it would be a good thing to have a backup of your source tree.


Anyway, thanks again!

fkamp
Back to top
View user's profile Send private message
GetCool
Guru
Guru


Joined: 23 Nov 2003
Posts: 324
Location: Madison, Wisconsin

PostPosted: Sat Jul 01, 2006 5:14 pm    Post subject: Re: why not? Reply with quote

fkamp wrote:
Why not backup all of /usr/src/linux by default?


Because your kernel sources are not required for a working system.

After you build your system, you can actually unmerge and delete your kernel sources if you wish. They might be needed at some point when you install a new package, but if you don't plan on installing any kernel-dependent packages for a while, then the sources don't have to sit on your hard drive.

Since they can occupy ~500 MB on an ext2/3 filesystem, I can see why someone would opt to leave them out of a stage4 backup.
Back to top
View user's profile Send private message
fkamp
n00b
n00b


Joined: 21 May 2006
Posts: 6

PostPosted: Sun Jul 02, 2006 5:40 am    Post subject: Reply with quote

GetCool,

Quote:
Because your kernel sources are not required for a working system.


That is a very valid point, thanks for explaining it!

fkamp
Back to top
View user's profile Send private message
kg4ysy
Apprentice
Apprentice


Joined: 08 Jul 2006
Posts: 183
Location: North Carolina

PostPosted: Mon Jul 10, 2006 5:47 pm    Post subject: Reply with quote

Awesome script...I have been looking for something like this. I love it. It could come in handy when I don't want to spend a week reinstalling Gentoo...

thx...
Back to top
View user's profile Send private message
gnychis
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1004
Location: Pittsburgh, PA

PostPosted: Tue Jul 11, 2006 10:22 pm    Post subject: Reply with quote

its a great script, i have it in my crontab to backup my computer nightly to an external drive, great for not having to worry about my raid-0 bombing
_________________
<---- me and Richard Stallman :)
Back to top
View user's profile Send private message
dem1an
n00b
n00b


Joined: 14 May 2002
Posts: 28

PostPosted: Thu Sep 07, 2006 1:28 pm    Post subject: Reply with quote

I tried restoring my stage4 today and go the following error. =\

tar: /mnt/gentoo: not found in archive
tar: Error exit delayed from previous erros
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 15, 16, 17, 18  Next
Page 16 of 18

 
Jump to:  
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