6

I've been running Freya since beta1, keeping it updated until today. Now, taking advantage of the 0.3.1 update, I want to perform a clean install. How do I go about doing this and backing up my data beforehand? I'd like the best answer to be a comprehensive guide which takes into account the following:

  • backup/restore personal files
  • backup/restore installed applications: possible? advisable?
  • backup/restore system configurations: advisable?
  • move /home to a separate partition: pros/cons?

My goal is to find a good balance between keeping my files and apps and enjoying the new features introduced by the devs with the newest updates.

3

In my experience there is no single perfect solution for automated installation and backups. Every approach is usually quite customized to the needs and likes of the respective user. That said, I can only explain the way I handle things and hope you find some of the ideas useful...

There are several solutions for automation (like Chef, Ansible or Puppet) but for personal use (i.e. small scale) I prefer simple Shell scripts.

I think that there are four important categories that need automation/backup:

  • configuration data (your dotfiles, application config, dconf settings, etc)
  • applications (packages, additional repositories, other binaries etc)
  • personal data (pictures, documents, music, books etc)
  • security-relevant data (e.g. ssh keys)

I'll explain briefly how I handle each of those.

configuration data

I prefer to have this inside a version control system in order to easily track or undo changes if need be. I keep everything in a public GitHub repository and have some scripts to put them into place. Have a look at it and copy whatever you think is useful.

applications

In the same repository I have some scripts to install basic packages, add additional repositories or download other 3rd party applications.

personal data

I have a separate partition holding this kind of data. For some directories (like ~/Documents) I create a symbolic link (can be automated with a simple Shell script). Furthermore you should have a backup of this stuff in another place, for example in the cloud (I'm using Google Drive & Dropbox) or on a external hard drive.

security-relevant data

Obviously you don't want to make this private stuff public nor trust it to a company like Google or Dropbox. So I just keep a backup on an encrypted USB drive or SD-card.

With these precautions I am able to re-install the OS and setup my environment in a couple of hours. Every time you do this you will find things to improve, so consider it a constant work in progress.

I hope you find this helpful, just ask if you want to know anything in particular. An of course I appreciate any feedback on how to improve this ;)

  • Interesting info. Unfortunately, I'm looking for a more simple, point-and-click approach. Your answer seems to target a more power-user than I am, frankly. And it doesn't really explain the steps to take to accomplish the final result. I'm looking rather for a how-to guide. – Giulio Sant Sep 5 '15 at 9:24
  • AFAIK there is not easy point-and-click way to have an automated setup/backup. And if there would be, I'm pretty sure it will not cover certain needs or specific settings. So building some custom baked solution like I described above might seem a bit of a hassle at first and you are probably right that it is a power-user approach... But putting all these things together little by little helped me a lot in understanding the operating system and its configuration. This is always a good thing I guess ;) Anyway, best of luck in finding a better/easier solution, looking forward to more answers! – dsager Sep 5 '15 at 21:08
  • Sorry for the noob question, but what is automation exactly? – Giulio Sant Sep 5 '15 at 21:11
  • In this case automation means that several steps (e.g. install the app X,Y&Z or write settings A,B&C to the system configuration), which you usually would do manually, are done automatically. For example you would just run a script that performs these steps for you. Repetitive tasks are always good candidates for automation ;) – dsager Sep 5 '15 at 21:46

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.