I want to install RhodeCode on a test server at work. However, the internet access is restricted for that server, and RhodeCode has a lot of dependencies (I don't even have Python on that server). So I have to take a snapshot of the entire OS from the server, restore it in a virtual machine at home, install RhodeCode and everything else required, then copy it back at work - I already have some apps on the server, and I would like to avoid reinstalling them.

The first solution would be to take the HDD home (yes, I can do it, but I would like to avoid it).

The second solution would be to use Clonezilla and backup/restore the partitions.

However, is there another way to do it, using tar or something like it, while preserving the permissions and ACLs?

Update: Due to limited hardware resources I can't use VMware (or an equivalent) to run a virtual machine with RhodeCode.

A solution that is filesystem independent would be great, so I can use ext3 in the virtual machine.


SystemRescueCD includes a ready to go Partimage, which is quite convenient to save/restore an entire partition. But it won't transform the partition to another filesystem format.

If you really need this feature, you can try a full backup/restore with rsync. You can format your destination drive to whatever format you need. It's quite tricky, but it works. This ArchLinux tutorial will explain you all the tricks needed.

Take note that in order to restore your new enhanced system, you'll probably need to boot from a live CD. You won't be able to restore your system on a running one.

  • +1 the ArchLinux tutorial is very interesting, thank you.
    – alexandrul
    Jan 30 '12 at 6:41
  • @Coren: +1 for partimage. Recommended. Not sure what you mean by "won't transform it to an other format". Jan 31 '12 at 0:43
  • 1
    @FaheemMitha : I have edited my post. Is this more understandable, now ?
    – Coren
    Jan 31 '12 at 13:13
  • partimage is now superseded by fsarchiver. Sep 26 '17 at 9:50

You could download the packages manually and bring them in on a thumbdrive. If you don't want to figure out all the dependencies by hand, set up your vm, clear the package manager's cache, install the package and its (automatically calculated) dependencies, then just copy the cache onto a drive, bring that in, and install it all through the package manager.

  • RhodeCode's installation process needs access to some BitBucket/GitHub repositories.
    – alexandrul
    Jan 29 '12 at 20:17
  • @alexandrul Can you package them yourself?
    – Kevin
    Jan 29 '12 at 20:21
  • No, it's a bit above my level of experience.
    – alexandrul
    Jan 29 '12 at 20:27
  • +1 this seems to be a very good way to install updates. I'll set the same sources for apt on all systems, but could you tell me if the package manager cache includes the updated list of packages?
    – alexandrul
    Jan 30 '12 at 6:46

The only way I have found to do this, in regards to the filesystem change, is by working at the file level. Backing up a whole partition, which just contains files, is where FSArchiver really excels. I have done a whole system with FSArchiver, but you are required to fix your bootloader and other specific configurations. You also can get FSArchiver in the SystemRescueCD, or possibly in a standard package repo.

Working at the block level would be much simpler, I prefer partimage if the filesystem change is not a hard requirement.

  • 1
    FSArchiver worked like a charm, and SystemRescueCD seems to be the recommended way to use it.
    – alexandrul
    Feb 20 '12 at 11:28
  • I'm very happy I could help, usually I feel buried among the other responses. FSArchiver is a great tool, I've relied on it countless times. By avoiding the block level, You also save considerable disk space. It's also is much more flexible, for restoring specific files. Feb 20 '12 at 22:57
  • I like that it is able to skip just the corrupted files from broken archives. And it is also available in Parted Magic Live CD: partedmagic.com/doku.php?id=programs
    – alexandrul
    Feb 21 '12 at 6:44

Boot from a rescue cd/iso, attach an extern USB drive, copy it over (I would suggest dd for the boot-sector and tar.gz (tar czf) for the filesystem contents) and then restore it to the server the other way round: Boot from rescue cd/iso, attach the usb-drive, partition and format, get your boot-sector back with dd and fill the filesystems wth tar xzf.

You will need a working driver for your target harddisk in the initrd and target network-cards. So install them before you do the above procedure.

  • If I have grub installed in the MBR, I guess I can skip the dd part and just reinstall grub, right?
    – alexandrul
    Jan 30 '12 at 6:48
  • That should work. You can do this from your rescue cd/iso as well.
    – Nils
    Jan 30 '12 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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