Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I recently bought a 120 GB external harddrive. I want to backup my linux fs. Can someone suggest what is the safest and more effective way to backup linux. Can I just tar the whole root directory (/) and when I install a new one, just untar it on the root directory? Or can I use dd? Can you suggest some commands or utility for me to backup my whole linux and restore it whenever I format my hard drive?
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
I had an experience of plainly tarring the partition to .tar.bz2's and untarring it later. It worked. The main thing you should think of is bootloader. But I guess you have practice of CD boot-chroot-grub/lilo, if not - search here on how to restore bootloader.
Whenever I needed to backup a complete GNU/Linux, I used Mondo Rescue or Mondo Rescue CD (http://www.mondorescue.org/) to create a self-extracting cd/dvd system.
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
Yes. More exactly, I tarred directories in /, except for /tmp and /boot, as I remember, to restore /boot later by installing some minimal install (just for bootloader and /boot quickly and without effort) and then I overwrote everything I had tarred with old copies.
Can I just tar /boot? Does the MBR included in the /boot? I am also thinking if dd command can be used to backup and restore...What is the exact command you issued to copy the root directory? Does tar copy the permissions and groups?
However, after an error occurred: file size limit exceeded. I tried it again and received the same error message. It seems that the "dd" command can only copy up to 4GB of space. I also tried partimage but it does not finish for some reason. Maybe, "dd" command is also used by this application to copy files...
I'm kinda lost because I don't know how I will be able to backup my whole filesystem. I need to try out another distro without using virtualization to maximize the hardware resources. I think it would be easier to backup files on another hard drive so that I can restore my OS whenever I feel restoring my old filesystem.
Another question is that does the MBR of linux is the same as the /boot? My other question is that can my ipod be copied also? I sync my ipod using gtkpod and I see to it that I erase all my music on my PC to save up some space. But what if I wanted to upgrade and buy a larger capacity IPod and wanted to transfer everything from my old Ipod to the new one? Isn't that possible? Hope someone can help me out on this. Thanks.
Thanks. How about the MBR? Is it different with /boot? Can I also backup my Ipod which I believe has a NTFS format so that if I buy a new one, I'll just dump everything into it? Or do you know a tool for this one? Thanks.
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
If you dd and split your entire device, it should be no different for MBR, which is there. About iPod - I've never used one, but I think they are dumpable (though Apple may have made something strange to prevent direct copying).
Does dd copy the whole hard disk or just the used one? I've heard about partimage? Have you used that software? It only copies the used data...I just want to get feedback whether to use partimage or the dd...I've tried the partimage and it completed successfully after splitting it into 2GB each. Hope you can provide me the feedback on this one...Thanks.
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
Dd copies entire disk. Really I've never used it for that purpose - I used at most tarring all contents of fs, while having boot disk to restore bootloader. About partimage - I've never seen it at all.
You could try using the program called "partimage". It works pretty well, I use it all the time for making backups of my root partition and it preserves the bootloader.
How about copying NTFS partitions like Norton Ghost? Can partimage do this as well? I've heard that partimage 's support for NTFS is just experimental. Can you provide me some light on this? Thanks.
I was able to use partimage..After restoring my drive, Grub is not copied. I have to manually restore my MBR. The same with Windows XP the MBR was not restored. I also tried dd before to backup the MBR but it doesn't seem to work. I just want a tool that will backup everything (including the MBR) and will only backup the used data. This tool should be able to backup filesystems including linux and NTFS, FAT, etc..Ever heard of a tool like this? Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.