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 ... 11, 12, 13 ... 16, 17, 18  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
someguy
Guru
Guru


Joined: 10 Jul 2003
Posts: 433
Location: (-_-) .::OH_WELL::. (-_-)

PostPosted: Mon Sep 19, 2005 9:49 pm    Post subject: Reply with quote

wouldnt dd if=/dev/whatever of=/home/whatever.iso bs=512 work ?
_________________
print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<>
)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`
while [ 1 ] ; do echo "*" | telnet ip.of.print.er 9100 ; done
Back to top
View user's profile Send private message
iq_zero
n00b
n00b


Joined: 07 Feb 2005
Posts: 25
Location: Sweden

PostPosted: Tue Sep 20, 2005 8:58 pm    Post subject: Reply with quote

Hello Im having av harddrive that is making a horrible sound so im going to replace it. After looking for easy way of doing this I found this post.
I looks very interesting and I will give it a try.

The link to the script on page 1 is dead please update if the adress is changed i think this would make the wonderful howto complete.
_________________
"Lordi - Would you love a monsterman"
Would you love a monsterman?
could you understand
the beauty of the beast?
I would do it all for you
would you do it all
do it all for me
Back to top
View user's profile Send private message
koelle
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2004
Posts: 92
Location: Heidelberg, Germany

PostPosted: Wed Sep 21, 2005 7:36 pm    Post subject: Reply with quote

Hi,

i just used the backup script and everything went fine. Now i decided to reinstall WindowsXP. So I first booted the Gentoo 2004.2 Minimal LiveCD and repartitioned my harddisk:
Quote:
/dev/hda1 WindowsXP as NTFS
/dev/hda2 /boot
/dev/hda3 swap
/dev/hda4 Extended
/dev/hda5 /
/dev/hda6 /usr
/dev/hda7 /opt
/dev/hda8 /var
/dev/hda9 /tmp
/dev/hda10 /home


The whole backup process went fine until I wanted to reinstall grub into my MBR:
Quote:
grub
root (hd0,1)
setup (hd0,1)


This resulted in the following output

Quote:
Filesystem type is ext2fs, partition type 0x83

Checking if "/boot/grub/stage1 exists ... yes"
Checking if "/boot/grub/stage2 exists ... yes"
Checking if "/boot/grub/e2fs_stage_1_5 exists ... yes"
Running "embed /boot/grub/e2fs_stage_1_5 (hd0,1) .. . failed (this is not fatal)"

Running "install /boot/grub/stage1 (hd0,1) /boot/grub/stage2 p /boot/grub/menu.lst ... succeeded"



When I try to boot my System grub loads, but only into the grub shell.
How can I get my bootloader working again? I tried all day several times and am desperate right now!

Hope someone can help me.
greetings koelle
Back to top
View user's profile Send private message
koelle
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2004
Posts: 92
Location: Heidelberg, Germany

PostPosted: Wed Sep 21, 2005 8:25 pm    Post subject: Reply with quote

Hey,

I finally made it to install grub. I just installed SuSe, then chrooted into my Gentoo Environment and installed grub with:
Quote:
grub-install --root-directory=/boot /dev/hda


So grub loaded and I could select my Gentoo System. But then suddenly the following message appeared and the booting process stopped:
Quote:
UDF-fs: no VRS found
kernel panic - not syncing VFS: Unable to mount root fs on unknown-block(3,3)


What does this mean and how can i fix it?
Back to top
View user's profile Send private message
koelle
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2004
Posts: 92
Location: Heidelberg, Germany

PostPosted: Thu Sep 22, 2005 8:56 am    Post subject: Reply with quote

Hi,

i solved my problem. I still had root=/dev/hda3 in my grub.conf. It had changed to /dev/hda5. Now it works.

greetings koelle
Back to top
View user's profile Send private message
Hagar
Guru
Guru


Joined: 11 Feb 2003
Posts: 445

PostPosted: Sat Sep 24, 2005 10:44 pm    Post subject: Reply with quote

To preserve folder structures you can use the .keep files.

Code:
default_include_files="
/dev/null
/dev/console
/home
`/find /mnt -name .keep`
/proc
/sys
/tmp
/usr/portage
/usr/src
/var/log/emerge.log


In this example the mountpoints will be stored in the backup.
Gentoo provides .keep files in the mountpoints by default (cdrom, floppy) so why not benefit from it.
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat Oct 01, 2005 2:40 pm    Post subject: Reply with quote

How can i make this automatic (ie non interactive). I'd like to create a cron job to run the script every week.

cheers

bb
Back to top
View user's profile Send private message
DOSBoy
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jun 2005
Posts: 84

PostPosted: Mon Oct 03, 2005 11:18 pm    Post subject: Reply with quote

You could prepare the user input to create the archive as it is very simple. Make a file with something like:


1
y
n

or whatever. (I don't know exactly how the options proceed). Save it to somefile. Then

sh mkstage4.sh < somefile

should do the trick.
Back to top
View user's profile Send private message
Gotterdammerung
l33t
l33t


Joined: 11 Feb 2004
Posts: 627
Location: Rio de Janeiro, Brazil

PostPosted: Wed Oct 05, 2005 4:25 am    Post subject: Reply with quote

Including me on this thread.
_________________
A mind that is stretched by a new experience can never go back to its old dimensions. - Oliver Wendell Holmes
Back to top
View user's profile Send private message
funkoolow
Guru
Guru


Joined: 21 Sep 2004
Posts: 545
Location: er paese delle anguille

PostPosted: Sun Oct 16, 2005 1:26 pm    Post subject: Reply with quote

back here for this simple and direct question: since my gentoo works as webserver with php and mysql, is it relevant that during the backup process it's available on web and so it's possible that db and logs and such can be updated and or modified? will be useful and/or safer to stop apache2-mysql-php?

thanks :)
_________________
SabaziaLUG: il LUG a nord di Roma
Back to top
View user's profile Send private message
Bionut
n00b
n00b


Joined: 29 Mar 2004
Posts: 34
Location: south australia

PostPosted: Wed Oct 19, 2005 7:20 pm    Post subject: Reply with quote

just wanted to say thanks for the script... I'd hate to loose all my config etc because I'm too lazy to do it all myself.
Cheers :D :D :D
Back to top
View user's profile Send private message
tgh
Apprentice
Apprentice


Joined: 05 Oct 2005
Posts: 222

PostPosted: Fri Oct 21, 2005 3:36 pm    Post subject: Reply with quote

Noob questions.

1) What is a good directory to keep this script in? Where do admins like to keep scripts like this? I'm guessing "/usr/local/sbin" or should it go straight to "/sbin" since it's a critical file needed to restore the system? (Well, not really, you could restore by hand.) A lot of the pages that talk about directory structure lean more towards putting something like this in /usr/local/sbin, if I understand them correctly:

RedHat 5.0 - section 11.1.1.3
Linux Directory Structure (doc.vic.computerbank.org.au)
Linux Directory Structure (www.comptechdoc.org)

(answered my 2nd quesetion)
Back to top
View user's profile Send private message
funkoolow
Guru
Guru


Joined: 21 Sep 2004
Posts: 545
Location: er paese delle anguille

PostPosted: Fri Oct 21, 2005 4:00 pm    Post subject: Reply with quote

funkoolow wrote:
back here for this simple and direct question: since my gentoo works as webserver with php and mysql, is it relevant that during the backup process it's available on web and so it's possible that db and logs and such can be updated and or modified? will be useful and/or safer to stop apache2-mysql-php?

thanks :)


is this question too stupid? cmon, a simple "yes" or "no" would be enough :roll:
_________________
SabaziaLUG: il LUG a nord di Roma
Back to top
View user's profile Send private message
bigbob73
Guru
Guru


Joined: 31 Dec 2004
Posts: 332
Location: Under the Lone Star

PostPosted: Fri Oct 21, 2005 4:03 pm    Post subject: Reply with quote

tgh wrote:
Noob questions.

1) What is a good directory to keep this script in? Where do admins like to keep scripts like this? I'm guessing "/usr/local/sbin" or should it go straight to "/sbin" since it's a critical file needed to restore the system? (Well, not really, you could restore by hand.) A lot of the pages that talk about directory structure lean more towards putting something like this in /usr/local/sbin, if I understand them correctly:

RedHat 5.0 - section 11.1.1.3
Linux Directory Structure (doc.vic.computerbank.org.au)
Linux Directory Structure (www.comptechdoc.org)

(answered my 2nd quesetion)


I personally keep it in /root/scripts, but you could keep it wherever you feel most comfortable.

Bigbob
_________________
A computers attention span is only as long as it's electrical cord (Murphy)
Back to top
View user's profile Send private message
iq_zero
n00b
n00b


Joined: 07 Feb 2005
Posts: 25
Location: Sweden

PostPosted: Mon Nov 07, 2005 7:36 am    Post subject: Reply with quote

funkoolow wrote:
funkoolow wrote:
back here for this simple and direct question: since my gentoo works as webserver with php and mysql, is it relevant that during the backup process it's available on web and so it's possible that db and logs and such can be updated and or modified? will be useful and/or safer to stop apache2-mysql-php?

thanks :)


is this question too stupid? cmon, a simple "yes" or "no" would be enough :roll:


I have php and mysql running on my machine. I tryed this backupscript and it worked fine. I didnt stop any servers while creating the backup.
After I had unpacked the stage4 to my disk i rebooted and mysql and some other programs were complaining because i didnt have any log files. I created them with nano and rebooted again just to see that everything was ok.
The backup went great but the disk I was planning to run on crashed 12 hours after the machine was up and running again. IBM Deathstar :-(
I hope something can be useful
_________________
"Lordi - Would you love a monsterman"
Would you love a monsterman?
could you understand
the beauty of the beast?
I would do it all for you
would you do it all
do it all for me
Back to top
View user's profile Send private message
funkoolow
Guru
Guru


Joined: 21 Sep 2004
Posts: 545
Location: er paese delle anguille

PostPosted: Mon Nov 07, 2005 12:12 pm    Post subject: Reply with quote

iq_zero wrote:
I have php and mysql running on my machine. I tryed this backupscript and it worked fine. I didnt stop any servers while creating the backup.
After I had unpacked the stage4 to my disk i rebooted and mysql and some other programs were complaining because i didnt have any log files. I created them with nano and rebooted again just to see that everything was ok.
The backup went great but the disk I was planning to run on crashed 12 hours after the machine was up and running again. IBM Deathstar :-(
I hope something can be useful


thanks for your reply, man. I asked cause once I had problems too with mysql after restoring a stage4 and I solved them directly remerging mysql. Beyond that, everything gone smooth, so i wondered if this would happen everytime or not (and it seems yes, for now)...

btw, thanks again for your reply (oh, and sorry for your disk, those deskstar are PURE TRASHWARE :evil: )
_________________
SabaziaLUG: il LUG a nord di Roma
Back to top
View user's profile Send private message
Kuhrscher
Guru
Guru


Joined: 29 Dec 2003
Posts: 495
Location: Hamburg, Germany

PostPosted: Sat Nov 12, 2005 5:23 pm    Post subject: Reply with quote

Great script! Thank you!
Back to top
View user's profile Send private message
Lonnie
n00b
n00b


Joined: 13 Nov 2005
Posts: 3
Location: Minnesota

PostPosted: Sun Nov 13, 2005 3:55 am    Post subject: Total system backup. Reply with quote

This may have been answered, but my eyes are starting to cross from reading all the posts, so here goes.
I have a relatively new Gentoo install, only about a couple of weeks old. However, I didn't RTFM nearly as well as I should have. Thus, I have a Very nice partitioning scheme, for a Debian install. Not really very good for a Gentoo install.
What I would like to do is make a complete backup of what I have on here so far.
Totally re-format the hard drive and then restore the system.
I would keep the same partition numbering scheme, but there would be some serious resizing done, and likely make one partition and xfs or reiserfs for use with larger files.
I can burn to DVDs or CDs, and have both available.
So, could I accomplish this by simply commenting out all the "default_exclude_list=" options and changing the destination for the backup?
Here is my df -h output, so a few pointers would also be appreciated, except I will most likely keep all of them. :D

Filesystem Size Used Avail Use% Mounted on
/dev/hda5 2.8G 178M 2.5G 7% /
udev 501M 212K 501M 1% /dev
/dev/hda6 9.2G 81M 8.7G 1% /home
/dev/hda7 4.6G 3.6G 849M 81% /usr
/dev/hda8 7.4G 228M 6.8G 4% /var
/dev/hda9 4.6G 140M 4.3G 4% /opt
/dev/hda10 8.4G 138M 7.8G 2% /storage
shm 501M 0 501M 0% /dev/shm

Was thinking I could shrink /home down to around 5gig, increase /usr to maybe 8gig, /var and /opt at 1gig each and put all the rest in /storage and make it the xfs or reiserfs to handle any really large files I might run into.

Other than hosing up the initial partitioning scheme, and still having a bit of trouble with playing audio CDs, I am very happy with Gentoo.

Thanks for any and all help.
_________________
No windows on my computers
Do make a living working on them though
Mostly Debian, so far
Are we having Fun Yet?
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Sun Nov 13, 2005 4:06 am    Post subject: Reply with quote

quote from the script itself about $default_exclude_list:
mkstage4.sh wrote:
# don't touch it unless you know what you are doing!

you do not know, so leave it. this script works right out of the box for you - it has been made for exactly that purpose. as you'll only resize the partitions you won't even have to change /etc/fstab (well, that wouldn't be a problem, right? you may have to adjust it anyway if you change the filesystem).

for other questions: read at least the first post to get along (while backing up and/or restoring). you eyes won't be starting to cross from that :wink:

in case something doesn't work, please remember:
Jan L. A. van de Snepscheut wrote:
In theory, there is no difference between theory and practice. But, in practice, there is.
:roll:
_________________
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
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Sun Nov 13, 2005 5:03 am    Post subject: Reply with quote

unless you have security related reasons for being that granular in your partition scheme, i actually would recommend simplifying it a bit. my gentoo workstation is only split between /home and everything else in /. there might be good reason to make /boot a seperate partition (backwards compatibility and such). and sure, if you want make another partition for large files, go ahead.

blinkeye may get annoyed if we talk about this more here, so you may want to just start a new thread elsewhere on the subject.
_________________
Sheepdog
Why Risk It? | Samba Howto
Back to top
View user's profile Send private message
Lonnie
n00b
n00b


Joined: 13 Nov 2005
Posts: 3
Location: Minnesota

PostPosted: Sun Nov 13, 2005 3:47 pm    Post subject: Reply with quote

Very true, I do not know what my ideas would be doing with your script. So, I will just attempt it. I do have Gentoo installed, so I was able to muddle through setting up fstab at least once. :D

I did do a trial run with the script and I come up with about a 1gig stage4, and that was with everything that the script would normally accept.

Eyes didn't start crossing until I was into page 6 of 12 of the comments, at around midnight. :?

For sheepdog, I just like to play with partitions. Had I only made the three partitions suggested, I wouldn't have found this discussion, as I would not have had a need to re-partition my system.

I thank you for your prompt responses, and I assume that what I can't backup with the script is only stuff that will be re-created once I update the system, or in my case, info that I should make copies of before I make the backup attempt.

I really appreciate the hard work that you people do so that non-programmers like myself are able to use such a high quality operating system. Will really be nice once a few others get on the x86_64 bandwagon, like flashplayer.

Thanks again,

Lonnie
_________________
No windows on my computers
Do make a living working on them though
Mostly Debian, so far
Are we having Fun Yet?
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Sun Nov 13, 2005 4:27 pm    Post subject: Reply with quote

hi again. yes, if you haven't fiddled around with serious settings (like changing portage's path and so on) you will not lose any data. there are a lot of things one does not need to backup - because they'll be recreated.

and i do play with partition schemes around a lot myself, and with filesystems too (as i lost a complete reiser4 gentoo installation due to bugs i thought of this backup script).

i completely understand if your eyes are crossing if you read through this hole thread. but this should not be necessary. the thread itself is about problems, questions, suggestions. there's no need to read all the posts. if one does run into "personal" problems you might pm me - this has been done a lot.

i don't get annoyed about posts here at all - i just think it's better for everyone if we talk only about the script and the backup itself to keep the thread consise.
_________________
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
Ejunkie
n00b
n00b


Joined: 07 Jan 2005
Posts: 58
Location: 127.0.0.1

PostPosted: Mon Nov 14, 2005 12:03 am    Post subject: Reply with quote

hey,

i have a problem with a similar (sorry i hope i wrote is right) script

Code:

EXCLUDE="
--exclude=proc/*
--exclude=sys/*
--exclude=mnt/backup/*
--exclude=mnt/install
--exclude=var/log/*
--exclude=dev/*
--exclude=usr/portage/distfiles/*
"

if [ `whoami` != root ] ; then echo "you must be root, exiting" ; exit ; fi
cd /
tar -cjpvf /mnt/backup/backup.tar.bz2 `echo $EXCLUDE` *


it worked fine and i can get a fully working system with this, but when i want to emerge / compile it fails

and i dont know why, i hope someone can help me out.
Back to top
View user's profile Send private message
Sheepdogj15
Guru
Guru


Joined: 07 Jan 2005
Posts: 430
Location: Backyard

PostPosted: Mon Nov 14, 2005 12:53 am    Post subject: Reply with quote

actually hey BlinkEye, i wonder if there's a way to set it up to save your kernal .config file even if you don't save your sources. that if you have to dokernel recomplies later on you don't have to try to remember all the settings you had. i'm sure it's doable, i just don't know enough about bash scripting to try to customize it in :?
_________________
Sheepdog
Why Risk It? | Samba Howto
Back to top
View user's profile Send private message
-valheru-
Tux's lil' helper
Tux's lil' helper


Joined: 26 Oct 2005
Posts: 125

PostPosted: Mon Nov 14, 2005 1:46 am    Post subject: Reply with quote

Great script. I had a spare hard drive so figured, why not try it? Script ran perfectly, popped in new drive, followed instructions, seemed smooth till the portgage sync. Looked like it went all the way through however at the end I received this error:

Code:
Updating Portgage cache:
Traceback (most recent callout):
flie "/usr/bin/emerge",line 2705,in)
oldcate=portage.catsplit(cp_list[0])[0]
Index Error:list (forgot this part, can't read my own handwriting)


Anyway, followed the rest oft he instructions and system booted up just like you said. Perhaps b/c of the above error but the restored system seems very sluggish. Programs take a long time to load, etc. Scrolling has intermittent pauses. Any ideas?

Overall, this is a great script and I am sure this has something to do with me and me alone. Thanks.
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 ... 11, 12, 13 ... 16, 17, 18  Next
Page 12 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