Download the authoritative guide: Cloud Computing 2019: Using the Cloud for Competitive Advantage
One of the things that draws people to using Ubuntu is its package management. Despite upcoming changes to Ubuntu's software management, the current Debian package has been a large part of Ubuntu's success. One of the best parts about the Debian package management that Ubuntu provides is how easy it is to backup your software. In this article, I'll talk about some of the best techniques for backing up your software and how they differ from one another.
Ubuntu Software Center
Even though the Ubuntu Software Center's days may be numbered, you can still use it to sync your software selections up between computers. It's also possible to backup your applications using the Software Center as well. I should point out that it's also slow and not really the best experience.
First you need to sign-up for an Ubuntu One account. Yes, it's still a "thing" and is required to authenticate your PC. Once this is done, you need to sign in with the Software Center and select the machine you're working on as it's listed from the File menu. Where this will become really cumbersome is when you want to re-install your synced applications. You'll find that this has to be done one application at a time.
In my opinion, this isn't the most effective means for backing up software. Not only does it miss out on your PPA applications (it requires PPA repositories be available), it also doesn't make bulk restoration very easy.
I think Synaptic does a good job since it provides both a reliable backup of your software, along with a reliable means of restoration as well. Simply goto File, Save Markings As, check the "Save full state" box, then click Save. This provides you with both a list of all the applications on your computer and a means of reinstalling these applications all at once.
Now it's important to remember that many of these applications are relying on specific versions. So taking the list of applications and re-applying them to an upgraded version of Ubuntu won't likely go very well. The Save Full State method is best for backing up and restoring to the same Ubuntu version. This approach is also useful when migrating from one Ubuntu workstation to another, so long as it's running the same Ubuntu version.
One of the least talked about approaches for backing up Ubuntu software is to use what's called dpkg - - get selections. Not only can this provide you with a usable backup of your software, it can be automated using a bash script.
For example, by running the command "dpkg --get-selections > packages.lst", the list of packages currently installed on your system are dropped into the package-selections file. This is similar to running Synaptic's Save Full State method. With dpkg, however, the destination is set to the home directory by default. If you want the list to appear elsewhere, add this to packages.lst or simply cd (change directory) to the desired directory before running dpkg - - get selections.
Additional features dpkg provides are: merging, clearing selections and upgrading. You can learn more about using dpkg from the Debian page explaining how it works.
Aptik (Automated Package Backup and Restore)
Without a doubt in my mind, the best solution out there for software backup and restore is Aptik. Not only does Aptik make backing up and restoring software easy, it also does the same with your themes and application settings. Remember, none of the other options I’ve mentioned backs up themes or application settings – only Aptik does this.
Other features that make this the best way to backup your software include PPA sources backup and the ability to choose the applications you wish to backup. With the other methods, you're simply presented with a list of packages. Many of these packages are not applications that need to be backed up.
I realize that on the surface, none of this is that big of a deal. After all, the entire thing could be run via cron using a custom bash script. What makes this application impressive, however, is that it provides you with these options using something newbies could tackle. Asking newbies to run randomly shared bash scripts doesn't usually go over very well. When all is said and done, Aptik delivers a backup directory with everything you need to restore both your applications and the repositories they came from.
Is backing up software worth it?
Speaking for myself, software backup is a practice I don't usually participate in. The reason stems from the fact that I prefer the opportunity to purge unused applications whenever possible. So when I do a clean installation, the only data I'm mindful of backing up are my configuration files and other user data.
With a clean install of Ubuntu, it's easy enough for me to browse to ~/.config to delete any old software remnants found there. Today's Linux distros do a fantastic job at labeling everything clearly for easy management. This same purging principle also applies to how I deal with my PPA repositories. Far too often, I find that I have more than I'm using and they're only slowing down my update cycles. If I need to add a PPA once again, it's easy enough for me to do so manually.
My advice is this: if you need to restore your applications in case something breaks, Aptik is the way to go. On the other hand if you're like me and prefer a fresh start, simply backing up your user data is by far the cleanest approach. My biggest suggestion is by all means, always maintain an up to date backup of your user data. Because that's something that can't be easily replaced.
What say you? Are you the type of person who prefers to do a software backup or instead, do you prefer the clean simplicity of a fresh installation and manually installing your software. Hit the Comments and let me know what your preferred approach is.
I'm also interested in hearing about which methods you prefer for backup. I suspect we'll have a mixture of duplicity and rsync users out there. I look forward to hearing about what's working best for each of you.
Photo courtesy of Shutterstock.