* [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup @ 2008-03-12 4:10 forgottenwizard 2008-03-12 4:29 ` Logan McKenna ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: forgottenwizard @ 2008-03-12 4:10 UTC (permalink / raw To: gentoo-user I'm messing around with doing backups via rsync to an external hard drive, and I'm wanting to be able to strip out unneeded files from the backup (these will be archived by, probably, dar or tar later on), and was wondering if someone knew what I could strip out. Thanks. -- gentoo-user@lists.gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup 2008-03-12 4:10 [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup forgottenwizard @ 2008-03-12 4:29 ` Logan McKenna 2008-03-12 6:13 ` forgottenwizard 2008-03-12 7:10 ` Dale 2008-03-13 1:48 ` Iain Buchanan 2 siblings, 1 reply; 10+ messages in thread From: Logan McKenna @ 2008-03-12 4:29 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 505 bytes --] I just use mkstage4.sh which can be found on the forums. Works great for me On Tue, Mar 11, 2008 at 11:10 PM, forgottenwizard < phrexianreaper@hushmail.com> wrote: > I'm messing around with doing backups via rsync to an external hard > drive, and I'm wanting to be able to strip out unneeded files from the > backup (these will be archived by, probably, dar or tar later on), and > was wondering if someone knew what I could strip out. > > Thanks. > > -- > gentoo-user@lists.gentoo.org mailing list > > [-- Attachment #2: Type: text/html, Size: 854 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup 2008-03-12 4:29 ` Logan McKenna @ 2008-03-12 6:13 ` forgottenwizard 2008-03-13 8:43 ` "Mateusz A. Mierzwin'ski" 0 siblings, 1 reply; 10+ messages in thread From: forgottenwizard @ 2008-03-12 6:13 UTC (permalink / raw To: gentoo-user On 23:29 Tue 11 Mar , Logan McKenna wrote: > I just use mkstage4.sh which can be found on the forums. Works great for me > > On Tue, Mar 11, 2008 at 11:10 PM, forgottenwizard < > phrexianreaper@hushmail.com> wrote: > > > I'm messing around with doing backups via rsync to an external hard > > drive, and I'm wanting to be able to strip out unneeded files from the > > backup (these will be archived by, probably, dar or tar later on), and > > was wondering if someone knew what I could strip out. > > > > Thanks. > > > > -- > > gentoo-user@lists.gentoo.org mailing list > > > > I looked at mkstage4, but that isn't what I'm wanting. I never liked that script too much (its a good tool, mind you, just not what I'm wanting to use), and I'm wanting to do this via rsync instead of the script. -- gentoo-user@lists.gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup 2008-03-12 6:13 ` forgottenwizard @ 2008-03-13 8:43 ` "Mateusz A. Mierzwin'ski" 2008-03-13 17:20 ` forgottenwizard 0 siblings, 1 reply; 10+ messages in thread From: "Mateusz A. Mierzwin'ski" @ 2008-03-13 8:43 UTC (permalink / raw To: gentoo-user forgottenwizard pisze: > On 23:29 Tue 11 Mar , Logan McKenna wrote: > >> I just use mkstage4.sh which can be found on the forums. Works great for me >> >> On Tue, Mar 11, 2008 at 11:10 PM, forgottenwizard < >> phrexianreaper@hushmail.com> wrote: >> >> >>> I'm messing around with doing backups via rsync to an external hard >>> drive, and I'm wanting to be able to strip out unneeded files from the >>> backup (these will be archived by, probably, dar or tar later on), and >>> was wondering if someone knew what I could strip out. >>> >>> Thanks. >>> >>> -- >>> gentoo-user@lists.gentoo.org mailing list >>> >>> >>> > > I looked at mkstage4, but that isn't what I'm wanting. I never liked > that script too much (its a good tool, mind you, just not what I'm > wanting to use), and I'm wanting to do this via rsync instead of the > script. > > You should stop using rsync. Why? I've think like You couple days ago. Rsync is good but, when i record DVD with backup files of OS and try to restore by rsync then I started to waiting for files counting... and waiting... and waiting. So I use "tar -cjvpf <arch> <dir> --exclude=/dev --exclude=/proc --exclude=/root --exclude=/usr/portage/distfiles" and backup work's perfect. You can use ISOMASTER to edit ISO of minimal livecd of gentoo and add archive to that file, rebuild iso and write it on DVD - it works fine. Now restoring to full functional Gentoo needs 3 minutes of data decompresion to disk (tar -xjvpf) faster is without verbose mode. Next step is chroot <mount dir> /usr/sbin/lilo (after mounting proc) and reboot ;). This is faster :D -- gentoo-user@lists.gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup 2008-03-13 8:43 ` "Mateusz A. Mierzwin'ski" @ 2008-03-13 17:20 ` forgottenwizard 0 siblings, 0 replies; 10+ messages in thread From: forgottenwizard @ 2008-03-13 17:20 UTC (permalink / raw To: gentoo-user On 09:43 Thu 13 Mar , "Mateusz A. Mierzwin'ski" wrote: > You should stop using rsync. Why? I've think like You couple days ago. > Rsync is good but, when i record DVD with backup files of OS and try to > restore by rsync then I started to waiting for files counting... and > waiting... and waiting. So I use "tar -cjvpf <arch> <dir> --exclude=/dev > --exclude=/proc --exclude=/root --exclude=/usr/portage/distfiles" and > backup work's perfect. You can use ISOMASTER to edit ISO of minimal livecd > of gentoo and add archive to that file, rebuild iso and write it on DVD - > it works fine. Now restoring to full functional Gentoo needs 3 minutes of > data decompresion to disk (tar -xjvpf) faster is without verbose mode. Next > step is chroot <mount dir> /usr/sbin/lilo (after mounting proc) and reboot > ;). This is faster :D > -- > gentoo-user@lists.gentoo.org mailing list > > The rsync backup is just to an external hard drive, and not to a DVD. I'm going to make an archive (maybe with dar, maybe with tar) to burn to DVD so that I have something to restore from if everything goes kaput on me. -- gentoo-user@lists.gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup 2008-03-12 4:10 [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup forgottenwizard 2008-03-12 4:29 ` Logan McKenna @ 2008-03-12 7:10 ` Dale 2008-03-13 1:48 ` Iain Buchanan 2 siblings, 0 replies; 10+ messages in thread From: Dale @ 2008-03-12 7:10 UTC (permalink / raw To: gentoo-user forgottenwizard wrote: > I'm messing around with doing backups via rsync to an external hard > drive, and I'm wanting to be able to strip out unneeded files from the > backup (these will be archived by, probably, dar or tar later on), and > was wondering if someone knew what I could strip out. > > Thanks. > > I'm not sure if I am following you or not but I back up /boot /dev /home /sbin /var /bin /data /etc /lib /opt /root /usr when I do mine. /data is where I store most of my data. I skip /sys, /proc and /tmp since those are usually made by the kernel and /tmp is stuff that is cleared out when booting anyway. If you are asking what I think you are asking, you should be able to leave out /sys, /tmp and /proc and be fine. YMMV. Dale :-) :-) -- gentoo-user@lists.gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup 2008-03-12 4:10 [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup forgottenwizard 2008-03-12 4:29 ` Logan McKenna 2008-03-12 7:10 ` Dale @ 2008-03-13 1:48 ` Iain Buchanan 2008-03-13 3:48 ` forgottenwizard 2 siblings, 1 reply; 10+ messages in thread From: Iain Buchanan @ 2008-03-13 1:48 UTC (permalink / raw To: gentoo-user On Tue, 2008-03-11 at 23:10 -0500, forgottenwizard wrote: > I'm messing around with doing backups via rsync to an external hard > drive, and I'm wanting to be able to strip out unneeded files from the > backup define "unneeded". This is highly system dependant, as everyone puts important files all over the place. > (these will be archived by, probably, dar or tar later on), and > was wondering if someone knew what I could strip out. from the subject line I assume you want to be able to restore a bootable system? If so, you may need to back up more than just filesystems. What about the partition table and the master boot record? You can back up the mbr to a file by using dd: $ sudo dd if=/dev/hda of=mbr.img bs=512 count=1 (replace hda with your boot drive). In terms of Gentoo, you can strip out /var/tmp /usr/portage /home and possibly /opt. Probably some /var subdirs too like /var/log /var/www etc and some /usr subdirs like /usr/games /usr/include /usr/src etc. I'd say you _need_ /dev /proc and /sys. If you _really_ want to know for sure, turn on the atimes option in fstab for all your partions, then reboot and do a bit of stuff (log in, ssh, etc). Then use `find` to find all files that were accessed. Something like this: * edit /etc/fstab, delete noatime (replacing it with "defaults" if no other options remain) * $ touch /var/tmp/reference * $ shutdown -r now * log in, look around * find / -anewer /var/tmp/reference The output from the last command will be everything you _need_ to boot. Ideally, when backing up /proc /dev and /sys, do so from a cleanly shut-down system. HTH, -- Iain Buchanan <iaindb at netspace dot net dot au> My brother sent me a postcard the other day with this big sattelite photo of the entire earth on it. On the back it said: "Wish you were here". -- Steven Wright -- gentoo-user@lists.gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup 2008-03-13 1:48 ` Iain Buchanan @ 2008-03-13 3:48 ` forgottenwizard 2008-03-13 6:01 ` Iain Buchanan 2008-03-13 9:28 ` Neil Bothwick 0 siblings, 2 replies; 10+ messages in thread From: forgottenwizard @ 2008-03-13 3:48 UTC (permalink / raw To: gentoo-user On 11:18 Thu 13 Mar , Iain Buchanan wrote: > > On Tue, 2008-03-11 at 23:10 -0500, forgottenwizard wrote: > > define "unneeded". This is highly system dependant, as everyone puts > important files all over the place. > Things I would lose if I backed them up. Doing a prior backup, some files in /proc caused me problems, and rsync refused to delete anything in the following pass. > > from the subject line I assume you want to be able to restore a bootable > system? If so, you may need to back up more than just filesystems. > What about the partition table and the master boot record? You can back > up the mbr to a file by using dd: > $ sudo dd if=/dev/hda of=mbr.img bs=512 count=1 > (replace hda with your boot drive). > The table, mbr, and partition table I'm not worried about. Those can be easily repaired (or replaced, depending on how one wants to do it) > In terms of Gentoo, you can strip out /var/tmp /usr/portage /home and > possibly /opt. Probably some /var subdirs too like /var/log /var/www > etc and some /usr subdirs like /usr/games /usr/include /usr/src etc. > > I'd say you _need_ /dev /proc and /sys. I'd like to know why. Some of the files in /proc change often, and cause rsync a problem. sys doesn't cause these problems, though. > > If you _really_ want to know for sure, turn on the atimes option in > fstab for all your partions, then reboot and do a bit of stuff (log in, > ssh, etc). Then use `find` to find all files that were accessed. > Something like this: > > * edit /etc/fstab, delete noatime (replacing it with "defaults" if > no other options remain) > * $ touch /var/tmp/reference > * $ shutdown -r now > * log in, look around > * find / -anewer /var/tmp/reference > > The output from the last command will be everything you _need_ to boot. > > Ideally, when backing up /proc /dev and /sys, do so from a cleanly > shut-down system. > > HTH, I'm trying to do this with the system booted up, because doing a daily sync like that would be a bit of a pain. -- gentoo-user@lists.gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup 2008-03-13 3:48 ` forgottenwizard @ 2008-03-13 6:01 ` Iain Buchanan 2008-03-13 9:28 ` Neil Bothwick 1 sibling, 0 replies; 10+ messages in thread From: Iain Buchanan @ 2008-03-13 6:01 UTC (permalink / raw To: gentoo-user On Wed, 2008-03-12 at 22:48 -0500, forgottenwizard wrote: > On 11:18 Thu 13 Mar , Iain Buchanan wrote: > > > > On Tue, 2008-03-11 at 23:10 -0500, forgottenwizard wrote: > > > > define "unneeded". This is highly system dependant, as everyone puts > > important files all over the place. > > > Things I would lose if I backed them up. meh? "uneeded" = "things I would lose if I backed them up"?... Isn't the idea of a backup so that you don't lose things? I'm confused. > Doing a prior backup, some > files in /proc caused me problems, and rsync refused to delete anything > in the following pass. ah, do you want to backup your data files only (documents, music, etc)? then you can ignore /proc /dev and /sys. I thought you wanted to back up the bootability of the system (in case a disk was corrupted, or you unmerged python, eg.) so that you wouldn't have to stuff around fixing it, as well as restoring your files. > > I'd say you _need_ /dev /proc and /sys. > I'd like to know why. Some of the files in /proc change often, and cause > rsync a problem. sys doesn't cause these problems, though. Is this why you're asking? Because you got some rsync errors from trying to copy /proc? You can safely ignore /proc! > > If you _really_ want to know for sure, turn on the atimes option in > > fstab for all your partions, then reboot and do a bit of stuff (log in, > > ssh, etc). Then use `find` to find all files that were accessed. > > Something like this: > > > > * edit /etc/fstab, delete noatime (replacing it with "defaults" if > > no other options remain) > > * $ touch /var/tmp/reference > > * $ shutdown -r now > > * log in, look around > > * find / -anewer /var/tmp/reference > > > > The output from the last command will be everything you _need_ to boot. > > > > Ideally, when backing up /proc /dev and /sys, do so from a cleanly > > shut-down system. > > > > HTH, > > I'm trying to do this with the system booted up, because doing a daily > sync like that would be a bit of a pain. again see above. You would only have to do that infrequently to see what was needed, but reading your reply, I don't think that's what you want... If you want to back up certain data, just explicitly backup that data. If you want to back up the entire system, then you need to backup the entire system! If you exclude /proc you won't loose any data, and your system will still boot if /proc is empty to begin with (I think). HTH a bit more! -- Iain Buchanan <iaindb at netspace dot net dot au> What has roots as nobody sees, Is taller than trees, Up, up it goes, And yet never grows? -- gentoo-user@lists.gentoo.org mailing list ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup 2008-03-13 3:48 ` forgottenwizard 2008-03-13 6:01 ` Iain Buchanan @ 2008-03-13 9:28 ` Neil Bothwick 1 sibling, 0 replies; 10+ messages in thread From: Neil Bothwick @ 2008-03-13 9:28 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1297 bytes --] On Wed, 12 Mar 2008 22:48:09 -0500, forgottenwizard wrote: > > I'd say you _need_ /dev /proc and /sys. > I'd like to know why. Some of the files in /proc change often, and cause > rsync a problem. sys doesn't cause these problems, though. You definitely don't want to backup /proc and /sys as they are virtual filesystems. /sys is fairly static but /proc changes all the time as it contains details on processes and the contents of memory. /dev/is also dynamic, but there are a couple of files in the /dev mountpoint that are needed before udev starts, and are no longer accessible via /dev/on a running system. One way of getting at these, and excluding /proc and /sys is to bind mount / elsewhere. mount --bind / /mnt/root Then backup /mnt/root. Alternatively, keep copies of the needed /dev files (null and console IIRC) and backup root with rsync's -x option (or -l if you are using tar). rsync also supports the use of include and exclude lists, so you can put a list of what you don't need: /tmp, /var/tmp, /usr/portage, etc, in a file to exclude them all from the backup. -- Neil Bothwick Crash: (v.) to terminate a program in the usual fashion, i.e. by locking up the computer or setting fire to the printer. (n.) the process of such termination. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-03-13 17:32 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-03-12 4:10 [gentoo-user] what isn't required to boot a system/what can be trimmed from a backup forgottenwizard 2008-03-12 4:29 ` Logan McKenna 2008-03-12 6:13 ` forgottenwizard 2008-03-13 8:43 ` "Mateusz A. Mierzwin'ski" 2008-03-13 17:20 ` forgottenwizard 2008-03-12 7:10 ` Dale 2008-03-13 1:48 ` Iain Buchanan 2008-03-13 3:48 ` forgottenwizard 2008-03-13 6:01 ` Iain Buchanan 2008-03-13 9:28 ` Neil Bothwick
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox