View previous topic :: View next topic |
Author |
Message |
mansniks Apprentice
Joined: 19 Nov 2007 Posts: 290
|
Posted: Mon Mar 10, 2008 7:50 pm Post subject: Backup gentoo OS while in operation? |
|
|
Hello,
is it possible to create backup of all OS files while it is running (backups itself)? How? |
|
Back to top |
|
|
coolsnowmen Veteran
Joined: 30 Jun 2004 Posts: 1479 Location: No.VA
|
Posted: Mon Mar 10, 2008 8:00 pm Post subject: |
|
|
Yeah, mount your second drive, stop non essential serves, especially database related things, anything that might modify the disk by itself.
If / is all one file system
cp -a --one-file-system / /mnt/second_drive
This wont be bootable with out a grub install and the device files
edit: this method assumes somethings, but I'm assuming you'll come back with questions and idiosyncracies _________________ emerge: there are no ebuilds to satisfy "moo" |
|
Back to top |
|
|
mansniks Apprentice
Joined: 19 Nov 2007 Posts: 290
|
Posted: Mon Mar 10, 2008 8:14 pm Post subject: |
|
|
Ok, I can type 'man cp' myself. Just tell me what is "idiosyncracies"?
But... There is one important question - how about all special files (devices etc)? I need full copy. Grub is not a problem.
So is there a way or I better turn off OS (sure, I don't like it)? |
|
Back to top |
|
|
coolsnowmen Veteran
Joined: 30 Jun 2004 Posts: 1479 Location: No.VA
|
Posted: Mon Mar 10, 2008 8:25 pm Post subject: |
|
|
I said idiosyncrasies, because I don't know what your exact setup is. If you have multiple partitions, then you'ld have to do it for each one, which is not hard in a script. the -x flag avoids the problems of cp trying to copy /proc /sys and /dev ( I forget which is the problem)
You asked this question as it was a backup (something you would do often), implying you would only need things like /dev if you had a system failure (rare), in which case I might have a boot disk handy, or boot and then deal with the pesky issue file. Which means you type in the root password, mount -bind /dev (the issue file tells you EXATLY what to do), and reboot. But as this only happens when I have a REAL problem, it doesn't bother me. I guess if you were trying to reduce down time to <5min... _________________ emerge: there are no ebuilds to satisfy "moo" |
|
Back to top |
|
|
coolsnowmen Veteran
Joined: 30 Jun 2004 Posts: 1479 Location: No.VA
|
Posted: Mon Mar 10, 2008 8:29 pm Post subject: |
|
|
I'm referencing this:
I guess you could deal with it ahead of time, you'ld only need to do it once
Quote: | -----------------------------------------------------
Your system seems to be missing critical device files
in /dev ! Although you may be running udev or devfs,
the root partition is missing these required files !
To rectify this situation, please do the following:
mkdir /mnt/fixit
mount --bind / /mnt/fixit
cp -a /dev/* /mnt/fixit/dev/
umount /mnt/fixit
rmdir /mnt/fixit
You may refer to these instructions at /etc/issue.
If you previously had an issue file, it has been
backed up at /etc/issue.devfix. Once you've fixed
your system, you will have to restore your old issue
file in order to get rid of this warning.
Thanks for using Gentoo !
https://bugs.gentoo.org/show_bug.cgi?id=40987
----------------------------------------------------- |
_________________ emerge: there are no ebuilds to satisfy "moo" |
|
Back to top |
|
|
coolsnowmen Veteran
Joined: 30 Jun 2004 Posts: 1479 Location: No.VA
|
Posted: Mon Mar 10, 2008 8:34 pm Post subject: |
|
|
IIRC, It would probably be enough to do this:
Code: | mknod /mnt/backup/dev/console c 5 1
mknod /mnt/backup/dev/null c 1 3
mknod /mnt/backup/dev/zero c 1 5 |
but don't take my word for it _________________ emerge: there are no ebuilds to satisfy "moo" |
|
Back to top |
|
|
mansniks Apprentice
Joined: 19 Nov 2007 Posts: 290
|
Posted: Mon Mar 10, 2008 8:54 pm Post subject: |
|
|
Omitting /sys and /proc is not a problem? |
|
Back to top |
|
|
coolsnowmen Veteran
Joined: 30 Jun 2004 Posts: 1479 Location: No.VA
|
Posted: Mon Mar 10, 2008 8:59 pm Post subject: |
|
|
not a problem, there are no files there anyways, they are virtual.
the /dev files are also to some degree, the only problem is, some are needed before udev has the chance to populate them...so you put them there ahead of time.
note: mount
/dev/sda1 on / type ext3 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid) _________________ emerge: there are no ebuilds to satisfy "moo" |
|
Back to top |
|
|
mansniks Apprentice
Joined: 19 Nov 2007 Posts: 290
|
Posted: Mon Mar 10, 2008 9:10 pm Post subject: |
|
|
Thank you! I see you answering me not first time. That makes me wonder how you find time! Gentoo is part of our life, right? |
|
Back to top |
|
|
|