2

so I just installed ubuntu 15.10 on my Macbook 6,2 core i5 and it is running flawlessly. Now before I got it to where it is now, I had a previous install which didn't work that great. In the previous install I installed the proprietary Nvidia drivers alongside with a bunch of updates and upon reboot, I was stuck at the login screen. I tried uninstalling the Nvidia driver and going back to noveau but didn't work that great either.

So I ended up doing a clean installation again and this time I installed the Nvidia drivers first and it worked, Now I have some pending updates to make but I'm afraid that it might break my system. I spend the whole day configuring the system to my liking and I would hate to do it all over again.

Is there a way I can backup my settings, ala "Windows System Restore" style, update and if anything goes wrong, I can just go back to where I was?

Kyon
  • 23

1 Answers1

1

Yes, you have an option to do this:

  1. Boot an Ubuntu Live DVD.

  2. Select Try Ubuntu.

  3. Now, when you are in live environment, open GParted and look for the partitions you are trying to backup, i.e., /dev/sda1 or /dev/sda2

  4. Next, open three terminals:

    a. In one of them write this command, do not press Enter now. Keep it open after typing the command:

    sudo ps aux | grep dd | awk '/root/ {print $2" "$11}'
    

    This command will give you the PID of the dd process used later on.

    After you run this command at a later time, you will get a name that would say only dd and a number infront of that, you have to take note of that number then.

    b. In the second terminal write this command, do not press Enter now. Keep it open after typing the command:

    watch -n 1 kill -USR1 THE NUMBER FROM STEP 4.a
    

    This command will show you the progress of the dd process in the third terminal.

    c. In the third terminal, type the following, and run it:

    After running this command, immediatly run the command from 4.a first and then the command from 4.b.

    sudo dd bs=4M if=/dev/sdXY of=/path/to/your/backup-directory/anyfilename.iso
    

    Here, /dev/sdXY is the partition you want to backup.

    This command will actually execute the dd command.

Now, keep tab on the terminal from 4.c and wait for the command to finish.

Backup completes on the completion of the command. Now, you can do whatever you want. Cheers!

Raphael
  • 8,035
  • Well, that's not convoluted at all. What's it supposed to do? Get dd to print its progress periodically? There's gotta be a better way to get a child process's PID from within a shell… – Blacklight Shining Dec 28 '15 at 08:44
  • Process juggling aside, all this really does is image a partition. This question is more about backing up system stuff only—in particular, things related to video drivers. There's gotta be something more specific that doesn't dump a potentially massive image somewhere. – Blacklight Shining Dec 28 '15 at 08:50
  • This is the best way I have found after trying many other tutorials. But if you know of any other way then you are free to post. Thank you! – Raphael Dec 28 '15 at 08:55
  • @BlacklightShining - I always do this before an upgrade and I have never faced any issue since the last two years. – Raphael Dec 28 '15 at 08:56
  • thanks for the instruction! I'll be doing this. Now hopefully I don't need to, but how would I restore this backup? and where is it backing up? – Kyon Dec 28 '15 at 14:52
  • The backup will be done to the directory you specify and the restoration will be done in a way similar as above. But for that please ask a new question – Raphael Dec 28 '15 at 19:07