Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How long did you stay logged in under your live CD? Sorry about that. The prolem is, you don't have any devices in your backup dev directory. The listing you have there is for the devices that your live CD provides. What you want to do, is copy everything in the /dev directory to the dev directory in your backup.
Code:
mount /dev/hda2 <somewhere>
mount /dev/hda3 <somewhere_else>
tar -zxpvf <somewhere_else>/<path_to_backup>.gz -C <somewhere>
mkdir <somewhere>/dev <somewhere>/proc <somewhere>/sys <somewhere>/tmp
mount -t proc <somewhere>/proc proc
mount -t sysfs <somewhere>/sys sys
cp -rvf /dev/* <somewhere>/dev
cd <somewhere>
chroot .
W00t~~!!!!! IT WORKED!!! What i believe happened was the -p option wasn't enough for what I was doing.
I used this command:
Code:
tar -zxcvf my-backup.tar.gz --same-permissions /
and rebooted and it worked. that's the only thing i believe i did different.
d0odman!! You are the greatest!! Thank you for your diligent help!
Quote:
cp -rvf /dev/* <somewhere>/dev
I never did that since I was extracting the tar.file onto the filesystem and the /dev wasn't being touched from the initial install and so it was populated already.
the "ls -la /dev" file below was when I was chroot-ed into the environment
Now I still want to test this again, To see if i can do this again.
But
I am at college and i need to work on my studies, but I will defiantly come back and retry this again when i have time, and finish this post.
There are still some questions I have found while searching for my answer:
1. What is the -P option actually do? Directories?
Quote:
-P, --absolute-names
don’t strip leading ‘/’s from file names
2. If I were to backup to a clean harddrive, what else should be looked at?
concerning /dev/ , /grub , anything else?
d0odman was right on track with what needs to be done. (thank you)
I found this link
which I think is really cool, but not entirely in my direction, but people can read up on there.
Oh, that's interesting. I guess I misread what you had earlier. I thought that you couldn't chroot into your backup because of bad/nonexistant permissions in your backup dev directory. I'm glad you got it figured out!
Oh yeah, while tar is good to use to package a whole bunch of files, I don't think it's very powerful for backups. What's useful about using tar is that you can pick out a certain file to restore. For incremental backups, it would be more useful than what I usually do.
When I set up a new Slackware machine, I inevitably end up screwing with it. Usually to the point of making it not work. So, to prevent that, I use dd to make a raw copy of the partition I installed to, that way, when it goes south, I can restore it to a state where it will work again. Say I installed to the same partition you've been using. I'd then do something like this:
One of the best parts of dd, is that you can raw copy a whole disk, and preserve the partition table information. BTDT, with an old panasonic 8GB laptop. I was able to save the drive's rescue disc pristine state (bought it used with no restore media), and put together a boot disk that I burned to CD along with the backup files that did nothing but prompt a user if it wanted to restore the images. The backup was pretty easy to do, the hard/long part was writing the scripts to do all of that.
So, if you want to just back up a few files, use tar, but use dd for a full norton ghost type backup. There's no reason you can't tar up the back up you did using dd, either, to compress the resulting backup.
Yes, it copies blank space as well, so it wouldn't work for you. There's a way to pipe the output through tar to compress it (I did an 8GB drive over 6 750MB CDs, with room to spare), but I don't know if you can do it directly.
I'll give you the boot disk I used for it. I just have to find it. It's somewhere in the digital void I call a file server, somewhere... When I find it, I'll bump this thread.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.