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, ... 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: 1046
Location: Gentoo Forums

PostPosted: Fri Apr 01, 2005 2:37 pm    Post subject: Reply with quote

Sade wrote:
just wondering: is the ccache also stored in the archive? it would be nice if u had the choise.

well, i gave some hints under "2. How to customise". i don't know where you put your ccache. check the variables, if it is a subfolder of a folder listed in the exclude variables add it to $default_include_list. if not put it either in $default_exclude_list or $custom_exclude_list (i suggest in $custom_exclude_list).
_________________
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
Sade
Guru
Guru


Joined: 22 Mar 2005
Posts: 406
Location: Netherlands - Eindhoven

PostPosted: Fri Apr 01, 2005 2:50 pm    Post subject: Reply with quote

i will try, i think i can complete that puzzle.
_________________
| 1.6Ghz atom N270 | adopt an unanswerd post | a nice way to post a config file |
Back to top
View user's profile Send private message
d_adams
Apprentice
Apprentice


Joined: 20 Oct 2003
Posts: 223

PostPosted: Sun Apr 03, 2005 4:20 am    Post subject: Reply with quote

Just tried this one out, and I must say, very nice work indeed. One of my kid's boxes had to be reloaded, so I used my backup to install gentoo on their box, instead of suse or windows, as it had both and was getting pretty messed up. I used the 1.2 version initially and got the console display error. I'm doing the 1.4 version now, and it's a lot better than doing a stage 1 or 3 install on a athlon xp 1900. Just need to create a user account for her and I'll be done. I set the backup file on my internal ftp, and used links from the live cd to get the file, and then untarred it. Very quick way to install gentoo.

Thanks a million for this one.
_________________
http://www.1and1.com/?k_id=16196755 click me for cheap linux based web hosting.
Back to top
View user's profile Send private message
DNL
n00b
n00b


Joined: 15 Mar 2005
Posts: 27

PostPosted: Mon Apr 04, 2005 12:35 am    Post subject: Reply with quote

Just want to drop in and add my thanks... Getting ready to try some stupid things for the sake of my own stupidity, and did a quick search for backup and found this. Excellent, I was hoping I wouldn't have to write my own. Thanks a lot for sharing this. Gotta love open source.
Back to top
View user's profile Send private message
Jerri
Guru
Guru


Joined: 03 Apr 2003
Posts: 353

PostPosted: Mon Apr 04, 2005 1:47 am    Post subject: Reply with quote

Sade wrote:
when i select copy and paste, i get a lot of spaces in my file, and i don't know how not to select them, or smartly remove the spaces.


cat file | sed '/^$/d'

check this out for more tricks...
Back to top
View user's profile Send private message
DNL
n00b
n00b


Joined: 15 Mar 2005
Posts: 27

PostPosted: Mon Apr 04, 2005 11:03 am    Post subject: Reply with quote

Well, unless I'm missing something, restoring this backup worked perfectly. Thanks again!

Highly recommend n00bs run this before doing anything they are unsure of. Could have used this before my first emerge --deep --newuse world...
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Mon Apr 04, 2005 5:54 pm    Post subject: Reply with quote

thanks for the feedbacks. i'm glad it's working for you guys too ...
_________________
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
Uncle_Psychosis
Guru
Guru


Joined: 31 Jan 2004
Posts: 387

PostPosted: Mon Apr 04, 2005 8:08 pm    Post subject: Reply with quote

Hi

This looks like a great script, thanks!

Could someone please help me out a little- I'm a bit confused as to how to use the backup once I've got it. What I want to do is use the stage4 to copy my system onto a new HDD. What do I need to do?

Here is what I *think* needs to be done:

boot from live cd into new hard drive, as if installing from scratch
fdisk accordingly
make filesystems
activate swap
mount /mnt/gentoo and /mnt/gentoo/boot in the right places
cd /mnt/gentoo
extract stage4
install portage snapshot [as per instructions in handbook]??
chroot
emerge sync
configure kernel??
configure /etc/fstab accordingly
configure Grub
Install system loggers and tools??
Create passwords and users

Have I missed anything or done anything unnecessary? Or do I just follow the handbook instructions, but replace their stage tarball with my own? Sorry for the silly questions!

Thanks

Sam
Back to top
View user's profile Send private message
Jerri
Guru
Guru


Joined: 03 Apr 2003
Posts: 353

PostPosted: Mon Apr 04, 2005 11:31 pm    Post subject: Reply with quote

Quote:
configure kernel??
configure /etc/fstab accordingly
configure Grub
Install system loggers and tools??
Create passwords and users


if your backing up a working install, these should already be taken care of. You might have to update your MBR if it was damaged... but everything else whould have been configured before you backed it up.

Basically, this whole process takes a snapshot of your system, as is (mind you, everything that is created when you boot, like sys/* and proc/ are excluded).
Back to top
View user's profile Send private message
Uncle_Psychosis
Guru
Guru


Joined: 31 Jan 2004
Posts: 387

PostPosted: Mon Apr 04, 2005 11:37 pm    Post subject: Reply with quote

Ok, thanks. I just tried it, and it complained that my .bz2 file was corrupted. Boogar. Will try again tommorrow.

Thanks

Sam
Back to top
View user's profile Send private message
mascanho
Veteran
Veteran


Joined: 21 Dec 2004
Posts: 1241
Location: On my Bmx Bike on a Concrete Park Flatlanding ...

PostPosted: Tue Apr 05, 2005 1:10 am    Post subject: Reply with quote

Damn, what a usefull script very good indeed, tanks man it realy saves a lot of work and time :P , tested it here and it works great 8)
_________________
Flatland Life is a Choice !
emerge avatar
Back to top
View user's profile Send private message
Asmdroid
n00b
n00b


Joined: 01 Apr 2005
Posts: 8

PostPosted: Fri Apr 08, 2005 1:53 pm    Post subject: Compilation Reply with quote

Hi, I have two systems a laptop and a pentium 4 driven desktop workstation. I'm wondering if the CFLAGs I used on my main Gentoo workstation (march=pentium4) are p4 optimized CFLAGS and if this means they will traumatise (or not) my i686 Celeron laptop system due to both processors being compatible with the same architecture somewhat?

Last edited by Asmdroid on Fri Apr 08, 2005 2:05 pm; edited 2 times in total
Back to top
View user's profile Send private message
Asmdroid
n00b
n00b


Joined: 01 Apr 2005
Posts: 8

PostPosted: Fri Apr 08, 2005 1:58 pm    Post subject: Reply with quote

Uncle_Psychosis wrote:
Ok, thanks. I just tried it, and it complained that my .bz2 file was corrupted. Boogar. Will try again tommorrow.

Thanks

Sam


Strange, me too, I might try tar.gz as space isn't an issue on my external hard drive. I'm guessing that bz2 doesn't find large achives attractive? Perhaps tar.gz will perform better. Integrity check failure.

"Unexpected EOF (End Of File)"
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Fri Apr 08, 2005 2:21 pm    Post subject: Re: Compilation Reply with quote

Asmdroid wrote:
Hi, I have two systems a laptop and a pentium 4 driven desktop workstation. I'm wondering if the CFLAGs I used on my main Gentoo workstation (march=pentium4) are p4 optimized CFLAGS and if this means they will triaumatise (or not) my i686 Celeron laptop system due to both processors being compatible with the same architecture somewhat?

i'm afraid but that won't work.
/etc/make.conf wrote:

# Host and optimization settings
# ==============================
#
# For optimal performance, enable a CFLAGS setting appropriate for your CPU.
#
# Please note that if you experience strange issues with a package, it may be
# due to gcc's optimizations interacting in a strange way. Please test the
# package (and in some cases the libraries it uses) at default optimizations
# before reporting errors to developers.
#
# -mcpu=<cpu-type> means optimize code for the particular type of CPU without
# breaking compatibility with other CPUs.
#
# -march=<cpu-type> means to take full advantage of the ABI and instructions
# for the particular CPU; this will break compatibility with older CPUs (for
# example, -march=athlon-xp code will not run on a regular Athlon, and
# -march=i686 code will not run on a Pentium Classic.

_________________
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
BlinkEye
Veteran
Veteran


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

PostPosted: Fri Apr 08, 2005 2:25 pm    Post subject: Reply with quote

Asmdroid wrote:
Uncle_Psychosis wrote:
Ok, thanks. I just tried it, and it complained that my .bz2 file was corrupted. Boogar. Will try again tommorrow.

Thanks

Sam


Strange, me too, I might try tar.gz as space isn't an issue on my external hard drive. I'm guessing that bz2 doesn't find large achives attractive? Perhaps tar.gz will perform better. Integrity check failure.

"Unexpected EOF (End Of File)"

could you guys specify your problem? how big is your stage4? i never had a tar.bz2 failing on me, although i've started to use tar.gz because of the time gaining. there is a limit to the hole size of the archive (filesystem dependent) - but the creation for the stage4 would stop while creating the tar, so, this isn't the problem
_________________
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
Asmdroid
n00b
n00b


Joined: 01 Apr 2005
Posts: 8

PostPosted: Fri Apr 08, 2005 2:31 pm    Post subject: Reply with quote

BlinkEye wrote:
stage4? i never had a tar.bz2 failing on me, although i've started to use tar.gz because of the time gaining. there is a limit to the hole size of the archive (filesystem dependent) - but the creation for the stage4 would stop while creating the tar, so, this isn't the problem


The file that I made was just over 1GB (1.1). I originally stored it to the default directory in the script then transferred across to my USB hard-drive, this took a fair amount of time after continuously sending parts then caching. This could be a problem with my hardware, I'm not sure. The file did include a few useless directories also, CCACHE for example, which isn't appropriate.
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Fri Apr 08, 2005 2:43 pm    Post subject: Reply with quote

do you still have the tar.bz2? could could you experiment further (like extracting ? it doesn't matter if you've inlcuded the ccache folder or not, a tar.bz2 is a tar.bz2 and MUST work.

EDIT: i'm just remembering that i had a lot of errors lately extracting some zipped files, so, did it just break or was it a warning/error at the end of the extracting? if possible post the error message
_________________
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
Mr Faber
n00b
n00b


Joined: 14 Mar 2005
Posts: 47

PostPosted: Fri Apr 08, 2005 8:56 pm    Post subject: Reply with quote

Thanks, this is a really great and easy to use script. It makes life much easier :)
Maybe an option for incrementell backups is usefull for future versions.

cu
Mr Faber
Back to top
View user's profile Send private message
devils
n00b
n00b


Joined: 19 Nov 2004
Posts: 17

PostPosted: Sat Apr 09, 2005 12:28 pm    Post subject: Reply with quote

Thanks alot man for doing this very cool script.
Exactly what i have been looking for...

/devil
Back to top
View user's profile Send private message
Uncle_Psychosis
Guru
Guru


Joined: 31 Jan 2004
Posts: 387

PostPosted: Sat Apr 09, 2005 5:14 pm    Post subject: Reply with quote

BlinkEye wrote:
do you still have the tar.bz2? could could you experiment further (like extracting ? it doesn't matter if you've inlcuded the ccache folder or not, a tar.bz2 is a tar.bz2 and MUST work.

EDIT: i'm just remembering that i had a lot of errors lately extracting some zipped files, so, did it just break or was it a warning/error at the end of the extracting? if possible post the error message


I'm afraid I binned the file so I can't be much help. It was about 3.5Gb because I'd also backed up my /home.

I've managed to restore my system onto a new hard drive using this, but I've ran into a few problems. For instance, I was getting a "Error opening terminal: Eterm." error everytime I tried to run nano, so I tried to fix this by re-emerging ncurses (which seems to be a fix for this sort of problem). However, ncurses fails with:

Code:
Could not run/locate "g++"
make[1]: *** [../obj_s/cursesf.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Could not run/locate "g++"
make[1]: *** [../obj_s/cursesm.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/ncurses-5.4-r5/work/ncurses-5.4/c++'
make: *** [all] Error 2
+ diefunc src_compile 84 2 'make failed'
+ local funcname=src_compile lineno=84 exitcode=2
+ shift 3
+ echo

+ echo '!!! ERROR: sys-libs/ncurses-5.4-r5 failed.'
!!! ERROR: sys-libs/ncurses-5.4-r5 failed.
+ echo '!!! Function src_compile, Line 84, Exitcode 2'
!!! Function src_compile, Line 84, Exitcode 2
+ echo '!!! make failed'
!!! make failed


Any ideas? I saw when I unpacked my stage 4 that it complained about not being able to hardlink a lot of files (don't ask which, it was scrolling way too fast!). Could this be the source of the problem? Do I need to just do an emerge -uD system/world to fix it?

Cheers

Sam [/code]
Back to top
View user's profile Send private message
feld
Guru
Guru


Joined: 29 Aug 2004
Posts: 593
Location: WI, USA

PostPosted: Sat Apr 09, 2005 11:43 pm    Post subject: Reply with quote

thank you SO much for this script. I just backed up, wiped my system, and tested the restore. IT WORKED FLAWLESSLY.

I really REALLY appreciate all the hard work you put into this backup script. Finally I have something easy and reliable enough to make me want to backup nearly every day :D (ok ok, i'll keep it to once a week!)


thanks again!



-Feld
_________________
< bmg505> I think the first line in reiserfsck is

if (random(65535)< 65500) { hose(partition); for (i=0;i<100000000;i++) print_crap(); }
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Sun Apr 10, 2005 7:04 am    Post subject: Reply with quote

Uncle_Psychosis wrote:

I've managed to restore my system onto a new hard drive using this, but I've ran into a few problems. For instance, I was getting a "Error opening terminal: Eterm." error everytime I tried to run nano, so I tried to fix this by re-emerging ncurses (which seems to be a fix for this sort of problem). However, ncurses fails with:

Code:
Could not run/locate "g++"
make[1]: *** [../obj_s/cursesf.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Could not run/locate "g++"
make[1]: *** [../obj_s/cursesm.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/ncurses-5.4-r5/work/ncurses-5.4/c++'
make: *** [all] Error 2
+ diefunc src_compile 84 2 'make failed'
+ local funcname=src_compile lineno=84 exitcode=2
+ shift 3
+ echo

+ echo '!!! ERROR: sys-libs/ncurses-5.4-r5 failed.'
!!! ERROR: sys-libs/ncurses-5.4-r5 failed.
+ echo '!!! Function src_compile, Line 84, Exitcode 2'
!!! Function src_compile, Line 84, Exitcode 2
+ echo '!!! make failed'
!!! make failed


Any ideas? I saw when I unpacked my stage 4 that it complained about not being able to hardlink a lot of files (don't ask which, it was scrolling way too fast!). Could this be the source of the problem? Do I need to just do an emerge -uD system/world to fix it?

Cheers

Sam

ncurses complains about not being able to run/locate the C++ compiler, which is bad. so i guess you can't emerge anything. i don't know how this happened but could it be due to your personal setup? have you had any hardlinks at all? what does
Code:
# emerge --info
# gcc -info

show?

the only option for hardlinks (if you have any) i saw in tar is
Code:
--check-links
              warn if number of hard links to the file on the filesystem mismatch the number of links recorded in the archive

so, you could change
Code:
# options for the tar command
 tarOptions="--absolute-names --preserve-permissions --totals --ignore-failed-read --verbose --file"

to
Code:
# options for the tar command
 tarOptions="--absolute-names --preserve-permissions --totals --check-links --ignore-failed-read --verbose --file"

but you need to do that only if you're working with hardlinks and i don't know if it will solve your problem or not. you're the first complaining about this.
_________________
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
Uncle_Psychosis
Guru
Guru


Joined: 31 Jan 2004
Posts: 387

PostPosted: Sun Apr 10, 2005 10:31 am    Post subject: Reply with quote

BlinkEye wrote:

but you need to do that only if you're working with hardlinks and i don't know if it will solve your problem or not. you're the first complaining about this.


I don't know. I know that I have personally never created any hardlinks...

Of course, the reason I'm doing this restore in this first place is because my old hard drive is on the way out (system just freezes and the logs show a whole load of i/o errors). It might well be that that is the cause of the problem. I did manage to fix this problem by doing a

#emerge --usepkg gcc
#emerge ncurses

Other than that, everything seems to be in tip-top condition. Thanks very much for the script---you've saved me hours of work!

Sam
Back to top
View user's profile Send private message
aschueler
Tux's lil' helper
Tux's lil' helper


Joined: 09 Apr 2004
Posts: 119

PostPosted: Sun Apr 10, 2005 5:49 pm    Post subject: Reply with quote

How do you recombine the split bzipped tar files? man split doesn't seem to tell me unless I am missing something.

Thanks for a great program that I hope I will never need!
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Sun Apr 10, 2005 7:49 pm    Post subject: Reply with quote

Code:
cat amd64-stage4-10.04.2005-minimal.tar.gz_* > amd64-stage4-10.04.2005-minimal.tar.gz

or
Code:
cat amd64-stage4-10.04.2005-minimal.tar.bz2_* > amd64-stage4-10.04.2005-minimal.tar.bz2

of course you may enumerate your splitted files instead of using an asterix
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, ... 16, 17, 18  Next
Page 2 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