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.

I keep a backup of my settings and files using:

sudo rsync --verbose --recursive --links --perms / /media/backup/

Is it possible to use rsync (or other bash options) to make a bootable backup of everything? I just want to "clone" everything to a pendrive or another disk and be able to work with the exact same enviroment. And I mean everything, like it was on the original disk (from permissions to installed apps, configs, paths).

I don't really trust GUI's to do this kind of job so I'm avoiding anything from the store.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

After rsync, you need to install grub on the drive, and fix /etc/fstab to point to the new volume uuid ( see blkid ), then chroot into the drive and run update-grub to update grub.cfg with the new uuid, then make sure these changes do not get reversed by any future rsyncs you do.

As an alternative, you could just install grub and rsync away, and whenever you actually need to boot the system, press e at the grub menu to edit the entry, and manually fix the root= argument to point to the other disk instead of the original.

share|improve this answer
    
Could you please also include the steps? –  Starx Nov 26 '13 at 6:18
    
When I tried t run update-grub it gave /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?). –  Starx Nov 26 '13 at 8:32

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.