Forum Home
Press F1
 
Thread ID: 113123 2010-10-06 06:01:00 Image linux drives gary67 (56) Press F1
Post ID Timestamp Content User
1142106 2010-10-06 06:01:00 Unusual question but can you image Linux drives to a windows machine as a backup?

I have an old XP machine that sits in my garage with several hard drives in that is my backup device from all my other machines, a server in all but OS. Now I have acquired another computer and wish to put Linux on it maybe ubuntu or mint and would like to then take an image and store it on my server can I do that as I would be imaging over my LAN? :help:
gary67 (56)
1142107 2010-10-06 06:21:00 Unusual question but can you image Linux drives to a windows machine as a backup?Yes, you can do that - although imaging them is a rather inefficient use of disk space. Unlike NTFS, Linux filesystems can be copied and restored directly without causing problems, you don't need to image them in order to get a full backup.

Backing up via an image would generally involve the use of 'dd', which will make an exact bit-for-bit copy of your disk, or if you'd prefer, just the linux partitions on that disk. This image can also be easily compressed, although by how much depends on the content stored on your disk.

Restoring the image simply involves using dd to write it back to the disk (and possibly uncompressing it on the way). If the image is of a partition only rather than of the whole disk, you will need to reinstall the bootloader on the MBR of the new drive.

Backing up the filesystem directly would normally be done via 'tar'. This will give you a single file that contains everything in your filesystem. Tar also integrates several compression tools, although as with dd, the compressibility depends on what you're storing. Also like dd, this process is extremely easy - and unlike dd, can generally be done while the system is running (although dd can also be done while the system is running if you're using any kind of system that allows for block-level snapshotting, e.g. LVM2).

Restoring the data with tar is also extremely easy - it simply involves partitioning and formatting the new drive, running tar to put the files back, and reinstalling the bootloader on the MBR.


...and would like to then take an image and store it on my server can I do that as I would be imaging over my LAN? :help:Yes, you can do that, and extremely easily - it's a simple case of mounting whatever network share you want to save the backup images to, and then telling the relevant tool (e.g. dd or tar) to save the image to that location.
Erayd (23)
1142108 2010-10-06 07:44:00 Thanks Erayd, now that I know what tools are needed I have been able to find some tutorials online for both tar and dd, can I assume that they are included in a standard Linux distro? gary67 (56)
1142109 2010-10-06 09:55:00 Yes - tar and dd are included with almost every Linux distro you are ever likely to run across, and should already be installed on your system.

The exceptions tend to be stripped-down embedded systems (usually based around busybox), with tar and dd disabled in the busybox compile-time config.
Erayd (23)
1142110 2010-10-06 17:37:00 Excellent will be giving it a go the first rainy day that comes along. :thanks gary67 (56)
1