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.

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.

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

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.

share|improve this answer
add comment

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!

share|improve this answer
add comment

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.