Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I know that on Windows it's quite futile to try to backup the "C:" partition file-wise and that's why a full partition backup is needed. Is it OK to backup a the root Linux partition file-wise? Are there any downsides?

Clarification

Here, I don't care about advantages of partial backups. I'm going to do additional separate backups of /home, etc. What I'm interested in here is the comparison of

  • backup of all files from /

  • vs. backup of the whole partition as device

What are the advantages of something like dd if=/dev/sda1 ...?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The classic backup method is to use tools like tar and dump to backup the files, usually with frequent incremental backups. As you mentioned, it was Windows that popularized image type backups as it lacked the ability to backup files that were in use. File level backups allow you to perform incremental backups and restores. With image backups, it is generally all or nothing. When restoring conventional backups, you have the option to restore to a different filesystem type, and any fragmentation in the old filesystem is left behind. Image backups put everything back exactly as it was. After restoring a conventional backup, you need to reinstall the boot loader by hand, but with image backups, it's a one step simple process.

If you are going to do an image backup, you want to use smarter tools like partclone or ghost4linux rather than dd, which doesn't distinguish between used and free parts of the filesystem. Skipping the free parts makes for a much smaller image and faster backup/restore times. Another limitation of image backups is that they can not be restored to a smaller disk/partition than the original, even if it was mostly free space.

share|improve this answer

The Linux filesystem is designed to be more flexible. I would actually suggest this (fragmented) as a backup strategy not only because it saves you a lot of bandwidth and storage space, but as long as you know what to do, restoring the data can often be a bit faster, assuming that you can restore to a base image and layer on your old data.

Of course such a strategy costs time and effort through planning and implementation. There are one-click whole-system backup solutions that take all the brain work out of the problem.

So you do have to address this on a case by case scenario. If you can live without a full configuration (ie you're happy to reconfigure), you can forget all about packages and /etc/ and just grab /home/. You could even slice that down and only grab elements of the home dirs. Scaling up you can grab lists of what packages are installed, their configuration, their data all the way up to the entire filesystem.

Just weigh up how confident you think you'll be if the worst happens and you need to restore the system. If you think you'll struggle trying to superimpose a partial backup, just set aside a few extra gigabytes and do full backups. If this is for a server, where regular, atomic backups are needed and bandwidth and storage is premium, you'll have to get a bit more familiar with the tools of the trade.

share|improve this answer
    
Your answer is good, but I see I didn't stated my question clearly. –  maaartinus Mar 1 '11 at 2:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.