Re: [gentoo-user] Using tar to backup my system
On Thu, 03 Nov 2005 19:41:19 -0500, Dave Nebinger wrote: I guess really what I'm saying is no, it is not a good idea. There's plenty of other backup solutions out there that would work better than this scheme. If you have a server and space for the file, rsync would even be a better solution. I you go down this road, I would recommend rdiff-backup. It has all the advantages of rsync (it uses librsync) but adds much more. For example, it keeps diffs when files change, so when you realise you've messed up your Apache config, you can restore the file you were using x days ago. -- Neil Bothwick Newsflash! Explosion at M$ beta testsite - Infinite number of monkeys killed. signature.asc Description: PGP signature
Re: [gentoo-user] Using tar to backup my system
On Friday 04 November 2005 01:44, Richard Watson wrote: Hi ... I've just spent ages compiling my laptop. I'm really happy with the result ... So fast ... What I want to is create a directory called /backup and then create a tarball using the command # tar -zcvf /backup/mylaptop.tar /[all directories] except /backup (as I don't want to go in circles). I'm then going to copy off the resulting tarball to my server in case my laptop dies (I'd rather not have to recompile everything). Does this sound OK?If I ever had to restore I would copy the file to / and run the command. # tar -zxvf mylaptop.tar -- Thanks, Richard you need to --exclude /proc, or you'll run into problems. You should exclude /sys, /dev/, /tmp and /var/run -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Using tar to backup my system
Or maybe bind / to a subdir and tar from it. It's like --one-filesystem but it works always (for me). 2005/11/4, Neil Bothwick [EMAIL PROTECTED]: On Fri, 4 Nov 2005 14:29:17 +0100, Hemmann, Volker Armin wrote: you need to --exclude /proc, or you'll run into problems. You should exclude /sys, /dev/, /tmp and /var/run And /sys and much of /mnt or /media. It's probably best to use the --one-filesystem option and specify the directories you do want tar --one-filesystem -czf /backup/name.tar.gz / /home /any/other/partition/ -- Neil Bothwick I'm Not Sure If I'm Homosexual, Said Tom, Half In Earnest. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Using tar to backup my system
On Fri, 4 Nov 2005 17:02:41 +0100, capsel wrote: Or maybe bind / to a subdir and tar from it. It's like --one-filesystem but it works always (for me). Why go to the trouble of mounting / again when tar already has an option to deal with this? I don't doubt that it works, but it seems like a long-winded way of doing things. -- Neil Bothwick Press any key to continue or any other key to quit signature.asc Description: PGP signature
Re: [gentoo-user] Using tar to backup my system
Neil Bothwick wrote: On Fri, 4 Nov 2005 17:02:41 +0100, capsel wrote: Or maybe bind / to a subdir and tar from it. It's like --one-filesystem but it works always (for me). Why go to the trouble of mounting / again when tar already has an option to deal with this? I don't doubt that it works, but it seems like a long-winded way of doing things. It has one major advantage regarding udev, in that some device nodes (/dev/console, for example) must exist in the /dev directory on the root filesystem, and when /dev is mounted and you use --one-filesystem, you won't backup those nodes. Binding / somewhere else let's you backup what is really on the root filesystem, so you will restore those device nodes when recovering from a live CD. -Richard -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Using tar to backup my system
On Fri, 04 Nov 2005 11:29:51 -0700, Richard Fish wrote: It has one major advantage regarding udev, in that some device nodes (/dev/console, for example) must exist in the /dev directory on the root filesystem, and when /dev is mounted and you use --one-filesystem, you won't backup those nodes. Binding / somewhere else let's you backup what is really on the root filesystem, so you will restore those device nodes when recovering from a live CD. Good point. -- Neil Bothwick Real women don't have hot flashes, they have power surges. signature.asc Description: PGP signature
[gentoo-user] Using tar to backup my system
Hi ... I've just spent ages compiling my laptop. I'm really happy with the result ... So fast ... What I want to is create a directory called /backup and then create a tarball using the command # tar -zcvf /backup/mylaptop.tar /[all directories] except /backup (as I don't want to go in circles). I'm then going to copy off the resulting tarball to my server in case my laptop dies (I'd rather not have to recompile everything). Does this sound OK?If I ever had to restore I would copy the file to / and run the command. # tar -zxvf mylaptop.tar -- Thanks, Richard -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Using tar to backup my system
2005/11/4, Richard Watson [EMAIL PROTECTED]: # tar -zcvf /backup/mylaptop.tar /[all directories] except /backup (as I don't want to go in circles). I'm then going to copy off the resulting tarball to my server in case my laptop dies (I'd rather not have to recompile everything). Does this sound OK?If I ever had to restore I would copy the file to / and run the command. # tar -zxvf mylaptop.tar tar cjpf /path/to/save/at/stage4.tar.bz2 / --exclude=stage4.tar.bz2 --exclude=/backup please make sure use the p paramters,it is keep the property of backup files -- / * Love in Gentoo-Linux C and Python * * Look at my blog * * http://poorc.wordpress.com * / -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Using tar to backup my system
# tar -zcvf /backup/mylaptop.tar /[all directories] except /backup (as I don't want to go in circles). You're going to want to exclude portions of /var, /dev, /proc /sys, /tmp, ... You're also going to want to dig deeper into command line options to preserve ownership, links rather than hard files, etc. # tar -zxvf mylaptop.tar Ah, -z isn't needed because mylaptop.tar is not compressed. The other larger problem is that it overwrites all files, regardless of whether they have been updated or not. I guess really what I'm saying is no, it is not a good idea. There's plenty of other backup solutions out there that would work better than this scheme. If you have a server and space for the file, rsync would even be a better solution. -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Using tar to backup my system
On Thu, 2005-11-03 at 19:41 -0500, Dave Nebinger wrote: I guess really what I'm saying is no, it is not a good idea. There's plenty of other backup solutions out there that would work better than this scheme. If you have a server and space for the file, rsync would even be a better solution. I'm going to try something I found on the Gentoo Wiki: # emerge netcat Remote machine runs # nc -l -p 1 image.gz Machine I'm backing up: # dd if=/dev/hda1 | gzip | nc -w 5 remote_ip 1 What do you think? I'm a bit puzzled by rsync at the moment so this seems to be a simple short term fix. Thanks, Richard -- gentoo-user@gentoo.org mailing list