-1

After reading the same question asked here at least hundred times I will ask it one more time :)
I need to backup everything, like .bashrc, regional settings, keyboard layouts, installed packages and applications, home directory in general to be able to restore all my stuff on clean system and start working in an hour or so. Ideally the backup should be done to cloud. Aptik looks like a solution, however it doesnt start on my fresh Ubuntu installation, and as I understand it cant upload backup to the cloud. In addition, as I understand, the backup is done on demand, I would prefer something that will sync my changes constantly to the cloud.
Any wonder solution?

0

home directory in general to be able to restore all my stuff on clean system and start working in an hour or so

I reinstall my system within 20 minutes without doing any extra backup procedures. All it takes is an SSD as bootable device.

  • I boot from a live dvd. Format / and /home and mount my data partition where my personal documents are.
  • I then start a script that adds the software I want to have on my system (that would be something like shutter, 1 extra browser, Mysql Workbench, LAMP, Eclipse, Jaspersoft studio). This script I change every so often to include other software or to remove software I do not care about any more.
  • I use 2 browsers (one for work and 1 private). Both are synched online so when I connect to my mail my browser settings, bookmarks and passwords are restored.

All other things I change manually; it is my experience Ubuntu is rather fluid when it comes to core functionality: we go from gnome to unity to gnome3, we go from init to upstart to systemd, we go from xorg to wayland back to xorg (in 18.04). Settings in one version often do not work in another version.

If you want to synch to a cloud: install the tool kit for that cloud. What you want is pretty specific so I would create my own script. Google cloud has a toolkit where you can use gcloud compute scp {file} {user}@{instance}:{dir/} --zone={zone} and {file} is copied to your cloud (you need to provide the project if you have more than 1). Can not be too difficult to find all the files you want synched to a cloud and add those all to a bash script.

  • MANUALLY is the word I dont expect to see in complete solution... You mention a script, it means that each time you add something you have to update your script. And then one say, I'll update it later, and voila, stuff forgotten. Same for cloud, you have constantly track yourself what you sync to it. – kreuzerkrieg Feb 14 '18 at 8:11
  • @kreuzerkrieg yes. And in my experience it is the better solution. Your automated solution is going to last for 6 months for a normal Ubuntu release; you can not expect the same plan to work in 18.04 when it arrives. It most def. will not if you come from 16.04. How many times do you expect to reinstall the same Ubuntu?! The method I picked is set such that it works on the same release but also across releases and even other Linux systems. And the maintenance to scripts: every 6 months I skim through it to see if changes to Ubuntu warrants changes to my script. Often that is not even the case – Rinzwind Feb 14 '18 at 8:19
  • makes sense... if you stick with LTS only... in any case, what if, your machine is gone and you want as quickly as possible to bring new machine to working state? what if you want to create additional machine, for example one for office and the second one for home, both used for the same purpose? – kreuzerkrieg Feb 14 '18 at 9:09
  • Personally I would use clonezilla for that @kreuzerkrieg Above method does not cancel the normal backup procedures. At work though we are not allowed to store private files on work related computers nor is it allowed to store sensitive information on anything else than a USB drive (that includes password, IP addresses, SSH keys, exports of client data etc). Our work systems are wiped every friday and reset to a default we have. Dutch law is pretty strict on this: if at any moment you can not explain what happend to data you need to inform -all- clients data could have been compromized. – Rinzwind Feb 14 '18 at 9:12
  • I would call it pretty harsh conditions :) People here use variety of OSes, including MacOS, so they have all their stuff backed up in iCloud, well, it does not contain any client info, but on the other hand it sure contains sensitive internal data like SSH keys, from here you can reach all proprietary code and IP, I guess.. – kreuzerkrieg Feb 14 '18 at 9:43
0

This is my backup regime which I have been using for years. I am open to suggestions if it can be improved upon.

For a bare bones backup use clonezilla to copy your system.http://clonezilla.org/downloads.php

For backup of Home directory and other directories that are important to you, use either rsync or the backup tool that comes pre-installed with Ubuntu called "Deja Dup". To run "Deja Dup" click the applications icon on the Launcher and enter "Deja" into the search bar.

For the reinstalltion of your packages, build and restore a list of installed packages.

To build the list of packages installed on your system the packages use:

sudo dpkg --get-selections > package.list

To restore the packages use:

sudo dpkg --set-selections < package.list

sudo apt-get dselect-upgrade

  • with rsync you have to constantly update your script to sync stuff. and Deja Dup doesnt work with cloud, except NextCloud, I would prefer it could use something I already have, OneDrive, GoogleDrive – kreuzerkrieg Feb 14 '18 at 8:14
  • To kreuzerkrieg. I use Deja Dup with OwnCloud for years without problems, so I don't really understand your comment that "Deja Dup doesnt work with cloud, except NextCloud" – SteveInBavaria Feb 14 '18 at 8:21
  • ??? could you elaborate? The only backup destination I see is "NextCloud", "Network Server" and "Local Folder" – kreuzerkrieg Feb 14 '18 at 9:05
  • It is simple! Under Destination (Speicherort in my German version) select Network Server and then add the server address in the "server address" box. – SteveInBavaria Feb 14 '18 at 9:14
  • Didnt know it could accept anything except something like Samba share, FTP and such. Definitely will give it a try. – kreuzerkrieg Feb 14 '18 at 9:55

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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