Q:

How to clone usb partitions

I have a bootable usb drive with Windows 7 installed on it. I want to remove the operating system but I also want to store the partitions that are on the drive. I would like to do it in a way that would allow me to reinstall the partitions at a later time. How would I go about this?

A:

There are many tools for this task, which mess with your data in a clever way to copy only what's needed, give good compression and so on. They understand the underlying file systems, meta data and more. Most of the time they are able to restore your data and operating system(s) even to lager and smaller disks and USB sticks. Usually they do their job very well, but from time to time they err in what they "beleve" they are copying and mess up your data. 
I'm using the simple and very deterministic command line tool dd for this purpose. As any Linux distribution, Ubuntu comes with dd included. If your USB drive is on /dev/sdb (you see that when you enter the command df, you can just
dd if=/dev/sdb of=/MY_ARCHIVE/USB-drive-Win7

to get a 1:1 copy of your USB drive. Later you can reverse the process at any time to restore your disk. 
You get all the pros and cons of copying an entire disk byte by byte:

no matter what was on the disk and by which OS it was written - you have a correct copy of it
no matter how much of the USB disk space was used, you have to copy the entire disk

If the size of the copy bothers you, you may fill the disk (still on Win7) with a file of 0s or repeated text patterns until it is completely full. Then you remove that file to free that space. This way you filled the unused space with a very compressable pattern. After dd-ing you can compress your disk image or even compress while taking the imige like so:
dd if=/dev/sdb | gzip >/MY_ARCHIVE/USB-drive-Win7.gz

You may decide to save single partitions only by replacing /dev/sdb with /dev/sdb1, /dev/sdb2, ..., and you may save the partition table, too, by saving the first sectors like so:
dd if=/dev/sdb count=1000 | gzip >/MY_ARCHIVE/USB-drive-Win7-first1000.gz

For all these dd commands you need root privillege, so either you have to be logged in as user root, or you have to prepend sudo in front of them.

