MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
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.
You could use
$ cp -ruva / /mnt/backup
where /mnt/backup is some kind of backup media like a Samba share on another computer or another hard drive. BUT you'd have to read the cp man page and make sure you exclude the /mnt/backup from the copy. Come to think of it, this first approach is a bad idea.
You might also try
$ dd if=/dev/hda1 of=/mnt/backup/hda1.backup
with some more options as per the dd man page. Like maybe bs=something or bc=something etc. Repeat for each partition. (Maybe see /etc/fstab or /etc/mtab for a list of partitions)
This way, you are copying the hard drive bit-for-bit, which avoids copying shit like /proc and /dev. You'll also preserve your partitioning, for example if you've put /usr on a separate partition to /var or /pron. You will receive a file for each partition, and you can put that back on a partition with:
$ dd if=/mnt/backup/hda1.backup of=/dev/hda1
You might want to read some man pages because I think those commands might trash your disk if you mix up input and output.
If you have a second hard drive the same size as the one with your important data on it, you can do
$dd if=/dev/hda1 of=/dev/hda2
or something like that, to duplicate the partition in its entirety.
You can also use hda rather than hda1 to backup the entire hard drive including the boot sector and crap. That might actually be a better idea. Also note that your hard drives might be sda, sdb or hd36dd, although I doubt your hard drive has breasts that big.
thanks pcwierdo. actually, I want to do something like a mirror of two disk but not RAID. I just want to have two identical content of hard drives. any other app that could speed up the process beside dd?
Why don't you want RAID? You can get software RAID these days. As far as I can tell, any system which would give you two copies of your hard drive would fall under the broad modern meaning of "RAID".
And dd will go as fast as your hardware allows. Shell scripts and cron can be used to automate it to backup once a day or whenever, but this is not as good as RAID. dd is more useful for once-off or irregular backups.
thanks pcwierdo. actually, I want to do something like a mirror of two disk but not RAID. I just want to have two identical content of hard drives. any other app that could speed up the process beside dd?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.