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


Joined: 12 Aug 2005
Posts: 48

PostPosted: Tue Aug 30, 2005 3:23 am    Post subject: Reply with quote

I was able to get some help on one of the support forums [Kernel & Hardware] sorry, I sould have read the guidelines for this forum prior to posting :oops: , and found that the script does umount the /boot file. So all I had to do was mount my /boot back to /dev/hda1.
Thanks again for your help,
Dino
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Tue Aug 30, 2005 12:10 pm    Post subject: Reply with quote

Just used this way after a resize of my / partition (the last on the disk and reiserfs, needs to backup and restore...)

After restore process:

/mnt directory was empty, I had to recreate manually some dirs.
(i.e.: #mkdir /mnt/cdrom )
needed to reemerge splashutils (#emerge --oneshot splashutils)
and then to follow the emerge info to recreate the fake /dev/tty1 dev in
the boot partition
Code:

 mount --bind / /lib/splash/tmp
mknod /lib/splash/tmp/dev/tty1 c 4 1
umount /lib/splash/tmp


Now it seems to run properly
(the first two emerge sync were kinda strange, first one "from chroot" interrupted on metacache computing,
second one from my system updated all the profiles from 2003 to 2005. now even emerge sync seems to
work in the right way)
_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
nokilli
Apprentice
Apprentice


Joined: 25 Feb 2004
Posts: 196

PostPosted: Fri Sep 02, 2005 4:41 am    Post subject: Reply with quote

Here's a post I wrote about how maybe this script could be used to do more than backup and restore.

Maybe I should have posted it here?
Back to top
View user's profile Send private message
nunogt
Tux's lil' helper
Tux's lil' helper


Joined: 08 Dec 2004
Posts: 134
Location: Lisbon, Portugal

PostPosted: Sat Sep 03, 2005 8:49 am    Post subject: Reply with quote

Hi, thanks for the great script. One question, though:

I'm considering removing Windows completely from this machine, which is currently installed in hda1 and takes approx 5 GB. hda2 is /boot, hda3 is swap, hda4 is / . Will it be necessary to make adjustments to the backup images once the partition table changed and I want to restore them? All the partititons will decrease 1 unit (hda2 -> hda1, etc) and hda4 will be /var/cache/squid/
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Sat Sep 03, 2005 8:55 am    Post subject: Reply with quote

first: good idea :wink:
second: partition your harddisk in any way you want (resizing, removing, creating) - just remember to adjust your (extracted old) fstab from the stage4 - maybe even grub/lilo's config.
_________________
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
gnychis
Veteran
Veteran


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

PostPosted: Sat Sep 03, 2005 11:26 pm    Post subject: Reply with quote

hey all, i'd love to use this script, I am just a little confused about something...

i don't see /etc as being backed up, why is /etc not backed up since /etc/conf.d and /etc/init.d contain all of our startup scripts and configurations??

does this mean that everything in my home directory will NOT be saved during a minimal backup? What if I want my home directories to be included during minimal backup? Can I take "/home/*" out of here?
Code:

# IMPORTANT: A minimal backup will EXCLUDE files/folders listed here. A custom backup will
# include/exclude these files/folders depening on your answer.
custom_include_list="
/home/*
/usr/src/linux-`uname -r`"


after i create the backup file, how can i "cat" or output all the files contents so i can check over what is in it to make sure all my important files were backed up?

Thanks!
George
Back to top
View user's profile Send private message
nunogt
Tux's lil' helper
Tux's lil' helper


Joined: 08 Dec 2004
Posts: 134
Location: Lisbon, Portugal

PostPosted: Sat Sep 03, 2005 11:59 pm    Post subject: Reply with quote

BlinkEye wrote:
first: good idea :wink:
second: partition your harddisk in any way you want (resizing, removing, creating) - just remember to adjust your (extracted old) fstab from the stage4 - maybe even grub/lilo's config.


Sounds easy. Thanks for clarifying this.

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


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

PostPosted: Sun Sep 04, 2005 5:14 am    Post subject: Reply with quote

another concern of mine, i ran it as a minimal backup, 4 hours elapsed, and it was still running, and i ctrl+c'ed and i found this file:

Code:

monster stage4 # ls -l
total 33217944
-rw-r--r--  1 root root 33981988864 Sep  4 01:12 monster-stage4-2005.09.03-minimal.tar.bz2


massive

what the heck did i do wrong?
Code:

default_exclude_pattern="*.mp3 *.iso *.gcm"

default_exclude_list="
/dev
/lost+found
/mnt
/proc
/sys
/tmp
/usr/portage
/usr/src
/var/log
/var/tmp
/var/db
/var/cache/edb
$stage4Location
`echo $CCACHE_DIR`"

default_include_files="
/dev/null
/dev/console
/home
/mnt
/proc
/sys
/tmp
/usr/portage
/usr/src
/var/log/emerge.log"

default_include_folders="
/var/db
/home/*"

custom_include_list="
/usr/src/linux-`uname -r`"

custom_exclude_list="
/home/hedpe/server"

custom_exclude_pattern="*.mp3 *.iso *.gcm"
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Sun Sep 04, 2005 9:11 am    Post subject: Reply with quote

about your question of including home in a minimal backup - yes, this is the way to go (remove it from custom_include_list and it will be backed up anytime). to see what is actually being stored run the script in verbose mode (--verbose/-v). /etc is backed-up of course. the script uses a find command (as this allows a lot more finetuning as just listing folders).

to see if your backup worked read "Re-assemble split-ed stage4" in the first post.

about your enormous stage4 - it seems like you didn't exclude a big movie/mp3/download folder. it could be that the find command does not work correctly though. if you could have a further look into this you could help us all.
_________________
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
gnychis
Veteran
Veteran


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

PostPosted: Sun Sep 04, 2005 3:49 pm    Post subject: Reply with quote

okay maybe you can help me out a little with this, so let me tell you what I want:

I want all home directories backed up recursively, BUT I want this folder excluded:
/home/hedpe/server

OR

I want all home directores backed up recursively, BUT I want .mp3, .gcm, and .iso excluded

I thought I had done the second of the two with the variables I gave above, but I think it was including all the .mp3, .gcm, and .iso files.

What did I do wrong?

They are all in /home/hedpe/server
Back to top
View user's profile Send private message
gnychis
Veteran
Veteran


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

PostPosted: Sun Sep 04, 2005 10:59 pm    Post subject: Reply with quote

no matter what i do, it keeps backing up my mp3s, I did a verbose mode on it, and i saw it backing up my .mp3 files under the directory /home/hedpe/server/mp3s/an-album/here.mp3, even with these settings:

Code:

default_exclude_pattern="*.mp3 *.iso *.gcm"

default_exclude_list="
/dev
/lost+found
/mnt
/proc
/sys
/tmp
/usr/portage
/usr/src
/var/log
/var/tmp
/var/db
/var/cache/edb
$stage4Location
`echo $CCACHE_DIR`"

default_include_files="
/dev/null
/dev/console
/home
/mnt
/proc
/sys
/tmp
/usr/portage
/usr/src
/var/log/emerge.log"

default_include_folders="
/var/db"

custom_include_list="
/usr/src/linux-`uname -r`"

custom_exclude_list=""

custom_exclude_pattern=""



As you can see, the only things I changed from the original script was default exclude pattern and i removed /home/* from custom_include_list

so... therefore it started to back up /home/hedpe ... but it was NOT excluding the *.mp3 like it should have since i put it in default_exclude_pattern

I used menu option 3

thanks!
George
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Mon Sep 05, 2005 9:31 am    Post subject: Reply with quote

please use the script in its original state once again. then, do a custom backup and chose your home to back up. add your desired exclude extensions to custom_exclude_pattern (not default_exclude_pattern):
Code:
custom_exclude_pattern="*.mp3 * *.iso *.gcm"

and try again.
_________________
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
scoobydu
Veteran
Veteran


Joined: 16 Feb 2003
Posts: 1076
Location: 'Mind the Gap'

PostPosted: Mon Sep 05, 2005 6:39 pm    Post subject: Reply with quote

Whats the best way of including only the configuration files in my /home/local/ directory? ie the dot config files ...

If I add '.*' to my include files will I need to select backup home?

tia

ps great script!
_________________
Tyan Tiger K8W, 2xOpteron 240,Powerbook5,6 15" 1.5g, Macbook Black 2g, Mac Mini 1g, Ipod P60g.
| Linux - From a windows user perspective|
Back to top
View user's profile Send private message
-=GGW=- $ol!d $n4>|e
Veteran
Veteran


Joined: 12 Apr 2004
Posts: 1616
Location: USA

PostPosted: Tue Sep 06, 2005 6:10 am    Post subject: Reply with quote

hmm, I made a stage 4 when i was about 1/2 through custumizing, then i got done messing with config files and went straight to installing extras. Now i'd like to make another stage4 but this time, instead of bieng a little under a gig, it ran for abou 2 hours and when i checked to see what was goin on, it had 11 cds worth of zips already... did it screw up, or do I have to manually tell it to leave some directory out that it doesnt by default and for some reason, that dir is huge on my system? I'm using --split and then 3 any help on decreasing the size of the zips would be greatly appreciated, although I wouldn't mind a full backup.. i have a 4x cdr :oops:
Back to top
View user's profile Send private message
gnychis
Veteran
Veteran


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

PostPosted: Tue Sep 06, 2005 6:18 am    Post subject: Reply with quote

BlinkEye wrote:
please use the script in its original state once again. then, do a custom backup and chose your home to back up. add your desired exclude extensions to custom_exclude_pattern (not default_exclude_pattern):
Code:
custom_exclude_pattern="*.mp3 * *.iso *.gcm"

and try again.


worked perfectly, thanks blinkeye!
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Tue Sep 06, 2005 10:43 am    Post subject: Reply with quote

-=GGW=- $ol!d $n4>|e wrote:
hmm, I made a stage 4 when i was about 1/2 through custumizing, then i got done messing with config files and went straight to installing extras. Now i'd like to make another stage4 but this time, instead of bieng a little under a gig, it ran for abou 2 hours and when i checked to see what was goin on, it had 11 cds worth of zips already... did it screw up, or do I have to manually tell it to leave some directory out that it doesnt by default and for some reason, that dir is huge on my system? I'm using --split and then 3 any help on decreasing the size of the zips would be greatly appreciated, although I wouldn't mind a full backup.. i have a 4x cdr :oops:

the script does backup everything on your computer - except those folder you excplicitly exclude or which are excluded by default. so, if you have created a folder like /mp3 or /backup it will backup this folder if you don't add it to the exclude list (now it depends on your choice where to add that folder).
_________________
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
-=GGW=- $ol!d $n4>|e
Veteran
Veteran


Joined: 12 Apr 2004
Posts: 1616
Location: USA

PostPosted: Wed Sep 07, 2005 2:43 am    Post subject: Reply with quote

but i cant think of anywhere I've aded stuff besides in /home/fuag :\ I let portage handle pretty much everything and if it doesnt handle it, im sure to keep the program in a place I can see in case I want to delete it, I have quite a bit of game files in /opt such as quake3 doom3 ut2k4 and loads of mods for them but doesnt the sqript auto exclude /opt :?

EDIT: Lol, finished my work and checked... wow, apperently it doesnt... ima go tell it to leave out the games :lol: sorry for the posts
Back to top
View user's profile Send private message
PRC
Apprentice
Apprentice


Joined: 15 Aug 2005
Posts: 191

PostPosted: Wed Sep 07, 2005 7:31 am    Post subject: Reply with quote

Well..I tried the script it worked great on the compression part....but a few problems:

Broke ipw2200, my wireless module
Destroys a few vital symlinks ie. usr/src/linux

The symlink isn't a big problem...but has anyone figured out how to fix ipw2200. It seems to be the only thing forcing me to redo everything...

EDIT: It's not your script that breaks my ipw2200, I aplogize, udev-68 breaks ipw2200. You have to use udev-58, solves problem.

ADDON: Feature Request....it would be nice to renumber backups that happen on the same day...

stage4prefix=`hostname`-stage4-`date +\%Y.\%m.\%d`

how do you add the time to that?
Back to top
View user's profile Send private message
PRC
Apprentice
Apprentice


Joined: 15 Aug 2005
Posts: 191

PostPosted: Fri Sep 09, 2005 12:14 am    Post subject: Reply with quote

I have been using the backup script quite alot...but every damn one past xorg breaks. I think it has to do with xdm......but it might not the be script...but it works before i backup.....anyone run into this problem, and fix it?
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Fri Sep 09, 2005 3:14 am    Post subject: Reply with quote

G4User wrote:
stage4prefix=`hostname`-stage4-`date +\%Y.\%m.\%d`

how do you add the time to that?

you could add hours and minutes:
Code:
stage4prefix=`hostname`-stage4-`date +\%Y.\%m.\%d_%H:%M`

which would result in a
Code:
# date +\%Y.\%m.\%d_%H:%M
2005.09.09_05:13

appendix.
_________________
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
RypPn
n00b
n00b


Joined: 25 Nov 2004
Posts: 11

PostPosted: Sun Sep 18, 2005 4:44 am    Post subject: Reply with quote

First of all I'd like to thank you for taking the time to both write and subsequently enhance this script. It has saved me many hours of work trying to reconfigure weird and wonderful hardware (epkowa scanner,gps,wifi etc). I have noticed a few peculiarities on a freshly restored system however.

Apache fails to start due to /var/log/apache2 missing.
Mysql fails to start (still working on the solution to this one) , mysqld (/etc/mysql/my.cnf) fails to start.
Vmware-workstation fails to start, symptoms as descibed in this forum link https://forums.gentoo.org/viewtopic-t-381798-highlight-vmware.html , solution works.
Xfont Server updates FC cache and loads in fonts on every boot. Previously this only happened when adding a new font-set to /etc/X11/fs/config (I run xfs). This one bugs me the most as it takes an age for the Computer to boot.

I'm sure there is probably a simple solution to all these quirks, but as a non-programmer its a bit beyond me.

Any thoughts/suggestions/slaps on the back of the head are most welcome :lol:
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


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

PostPosted: Sun Sep 18, 2005 12:03 pm    Post subject: Reply with quote

i run into very similar problems while backing up my server and restoring the stage4 on new hardware. i simply couldn't get tomcat to start up again. i can't have a look into it until the next 4 weeks have passed - bear with me, i'll have a look into it.
_________________
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
RypPn
n00b
n00b


Joined: 25 Nov 2004
Posts: 11

PostPosted: Sun Sep 18, 2005 2:28 pm    Post subject: Reply with quote

Update...

Mysql needs removing and recompiling as per this forum link https://forums.gentoo.org/viewtopic-t-286297-highlight-mysql+error+2002.html , 3 cheers for kashani!

Luckily I was upgrading my hard drive, so I can plug in the old one to mysqldump the db's and then restore them. Definately one to watch out for if you use mysql :wink:

Only issue left is the font problem, I'll report back if/when I fix it.
Back to top
View user's profile Send private message
RypPn
n00b
n00b


Joined: 25 Nov 2004
Posts: 11

PostPosted: Sun Sep 18, 2005 6:30 pm    Post subject: Reply with quote

Last Update.

Re-emerging xorg has fixed the constantly scanning in fonts on boot issue, all is now well with the world 8)

If I come across any other gotcha's I will no doubt be back.
Back to top
View user's profile Send private message
frodoontop
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2004
Posts: 86

PostPosted: Mon Sep 19, 2005 5:08 pm    Post subject: Reply with quote

This is just plain perfect, wish I'd new this before. Now I can easily backup my system when everything works. Almost too easy. Just burn it to a dvd and unpack when needed.

Thank you very much, now I'll feel less shity when I fucked up everything :)
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 ... 10, 11, 12 ... 16, 17, 18  Next
Page 11 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