Ubuntu: Want to back up using dd, but my present ubuntu installation is 149.04 + 3.81(swap) GB, my target drive is only 149.05 GB



Question:

My netbook is a Windows7-Ubuntu 12.04 dual boot. in gparted the strcture looks like Partition filesystem size

  • /dev/sda2 extended 152.86GiB
  • __/dev/sda6 ext4 149.04GiB
  • __/dev/sda5 linux-swap 3.81GiB
  • /dev/sda3 ntfs 100MiB
  • /dev/sda4 ntfs 145.13GiB


  • /dev/sdb1 fat32 149.05GiB

I want to backup my ubuntu 12.04 installation that is sda2 (sda6 + sda5) to sdb1. As you can see sda5 +sda6 is 152.86 GB where are sdb1 is only 149.05 GB. Can I backup only sda6(149.04GB) without losing any data? That is to say, will I be able to restore my ubuntu using only sda6 and later add the needed swap? Edit: Made it readable.


Solution:1

Yes swap holds no persistant data so as long as your Ubuntu machine is shutdown the swap can be safely wiped or even removed. So I you back up just the ext4, you can restore it later without the swap.


Solution:2

As long as you have some free space on your ubuntu partition and wish to make a backup of the extended partition, including your swap (I don't know why, but maybe because of UUIDs and stuff), you could try FSArchiver. It's recommended on the GParted page and can apparently clone partitions to smaller ones as long as the data can fit on said disk.

If FSArchiver doesn't work for you, you could always try shrinking a gigabyte or so with GParted, which shouldn't be too hard. You might have to leave that space unallocated though, because there wouldn't be an easy place to put it (expanding partitions from the front is a risky business).

In any case, try backing up sda5 and sda6 separately instead of all of sda2 at once. You might find it easier to manage, as you would only ever need one swap backup if any!


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »