How to backup & restore programs

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
walterdowis
Level 3
Level 3
Posts: 149
Joined: Mon Feb 03, 2014 10:10 pm

How to backup & restore programs

Post by walterdowis »

Hi all,
I'm using Grsync to backup my Home folder. This backup will contain all my data and application configurations.
Is there a way to backup and restore all the programs I have installed? For example, if I want to test a new Ubuntu flavor distro is there a program that will backup and restore all my installed programs? In this way I can automatically restore the programs into the new distro without having to install each one, one at a time. Thanks.
User avatar
JoeFootball
Level 10
Level 10
Posts: 3326
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: How to backup & restore programs

Post by JoeFootball »

walterdowis wrote:Is there a way to backup and restore all the programs I have installed? For example, if I want to test a new Ubuntu flavor distro is there a program that will backup and restore all my installed programs? In this way I can automatically restore the programs into the new distro without having to install each one, one at a time.
I'm not sure if this is what you're looking for, but Clonezilla Live will create an backup image of your entire hard drive. Kind of a like a snapshot in time of the current disposition of all aspects of your system.

I use it for backup purposes, where I completely shutdown (i.e., no suspend, no hibernate, no sleep, etc.) all instances of OS, and boot to Clonezilla Live on CD or USB, and save the backup images to an external drive. It only stores the used blocks of the hard drive, so the resulting archive is significantly smaller than the hard drive itself.

Joe
walterdowis
Level 3
Level 3
Posts: 149
Joined: Mon Feb 03, 2014 10:10 pm

Re: How to backup & restore programs

Post by walterdowis »

Thanks for your suggestion. Clonezilla is a great tool and I use it as a backup of my entire disk drive. But I'm looking for a program that will backup applications and PPAs to be restored in a new Ubuntu distro install.
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: How to backup & restore programs

Post by austin.texas »

I wrote a couple of scripts that do that for me. You would have to modify my scripts to fit your system.
viewtopic.php?f=47&t=219728&p=1152047#p1152047
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
WharfRat
Level 21
Level 21
Posts: 13906
Joined: Thu Apr 07, 2011 8:15 pm

Re: How to backup & restore programs

Post by WharfRat »

An outline on how to do this is in man dpkg toward the end.

Save the state of your packages with dpkg --get-selections >myselections

Take that file to the machine with the new installation and run these as root:

Code: Select all

apt-cache dumpavail | dpkg --merge-avail
dpkg --clear-selections
dpkg --set-selections <myselections
apt-get dselect-upgrade
Good luck :wink:
ImageImage
User avatar
chrisuk
Level 5
Level 5
Posts: 592
Joined: Thu Jun 12, 2008 6:16 am

Re: How to backup & restore programs

Post by chrisuk »

There's many different ways to achieve your goal, some easier than others; but probably the easiest yet most complete way is to use Aptik
Chris

Manjaro MATE - MX Linux - LMDE MATE
Mildly_odd
Level 2
Level 2
Posts: 62
Joined: Sun Nov 13, 2016 8:40 am

Re: How to backup & restore programs

Post by Mildly_odd »

How can I get Aptik?
It sounds like it does what I want, i.e. sorts out all my installed programs either side of an upgrade to Mint.

I'm still quite new to Linux and a) cant make much sense of the link to Aptik and b) am uncomfortable installing things outside of the normal package manager.

Thank you
User avatar
JerryF
Level 14
Level 14
Posts: 5009
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: How to backup & restore programs

Post by JerryF »

Aptik isn't available through the normal Mint software center. You must add a PPA to your Software Sources.

Open Terminal (click on "Menu" and type the word 'terminal'). The app will show. You can press Enter or click on the app.

Type these commands into Terminal (one line at a time) and press Enter after each command:
(You can copy and paste)

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install aptik
*** IF your problem has been solved, please edit your ORIGINAL post and add [SOLVED] to the beginning of the Subject Line. It helps other members when browsing posts. ***
Mildly_odd
Level 2
Level 2
Posts: 62
Joined: Sun Nov 13, 2016 8:40 am

Re: How to backup & restore programs

Post by Mildly_odd »

That's great, very clear, I have tried it out and the package listing in Aptik looks quite straightforward. Thank you.

As an aside, I've seen a lot of apt-get commands though the working concept is a little vague to me. I'm assuming that, together with the PPA it provides access to arbitrary repositories that hasn't necessarily been put together carefully or checked for malicious software. Is that right, or is there some kind of volunteer crowd-sourced review in place?
User avatar
JerryF
Level 14
Level 14
Posts: 5009
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: How to backup & restore programs

Post by JerryF »

Mildly_odd wrote:That's great, very clear, I have tried it out and the package listing in Aptik looks quite straightforward. Thank you.

As an aside, I've seen a lot of apt-get commands though the working concept is a little vague to me. I'm assuming that, together with the PPA it provides access to arbitrary repositories that hasn't necessarily been put together carefully or checked for malicious software. Is that right, or is there some kind of volunteer crowd-sourced review in place?
I don't know about apps from repositories being checked for malicious software.

From what I understand, the commands do this:

sudo apt-add-repository -y ppa:teejee2008/ppa (This is pretty obvious. This adds teejee2008 to the PPA. You'll see it the the Software Sources [see pic])
Capture_001.jpg
sudo apt-get update (I think what this does is updates the list of available apps in the Software Manager)

sudo apt-get install aptik (Also pretty obvious. Installs the app Aptik. You could skip this step and actually search aptik in Software Manager and install it from there)
*** IF your problem has been solved, please edit your ORIGINAL post and add [SOLVED] to the beginning of the Subject Line. It helps other members when browsing posts. ***
Mildly_odd
Level 2
Level 2
Posts: 62
Joined: Sun Nov 13, 2016 8:40 am

Re: How to backup & restore programs

Post by Mildly_odd »

OK, Once again thank you for a clearly written answer. There doesn't seem to be a vote-up button on this forum, or have I missed it?

Lastly, just to see if my world-view matches yours:

A) if I get some software from the Software Manager from a fresh install of Mint then I understand that the software available there has been checked as appropriate "in some way, though without guarantee" by the Linux Mint maintainers and community.

B) if I go through a process of adding a repository as described here then it is the same risk as in Windows of downloading 3rd party software, I have to be more aware of the risks, though here there is the added dimension that it will appear in the software manager and that I won't necessarily be able to distinguish A from B
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: How to backup & restore programs

Post by austin.texas »

Mildly_odd wrote: A) if I get some software from the Software Manager from a fresh install of Mint then I understand that the software available there has been checked as appropriate "in some way, though without guarantee" by the Linux Mint maintainers and community.

B) if I go through a process of adding a repository as described here then it is the same risk as in Windows of downloading 3rd party software, I have to be more aware of the risks, though here there is the added dimension that it will appear in the software manager and that I won't necessarily be able to distinguish A from B
Those observations are basically accurate. Except that I would say that is not quite the "same risk" as 3rd party Windows software. Quite often, the linux software available in PPA's is open source. That makes a difference.
In regards to the specific case of Aptik, it has a history of usage which can be tracked on this forum. And judging from the comments I have seen over the years, it is trustworthy.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
Cosmo.
Level 23
Level 23
Posts: 17817
Joined: Sat Dec 06, 2014 7:34 am

Re: How to backup & restore programs

Post by Cosmo. »

Mildly_odd wrote:B) if I go through a process of adding a repository as described here then it is the same risk as in Windows of downloading 3rd party software,
Well, also in the Windows world 3rd party software and 3rd party software is not necessarily the same regarding risk. There do exist also in the Windows world well reputed programs, partly open source (like Firefox or LibreOffice) and closed source (like Foobar2000), which can be judged as safe, as long as you take them only from the original source. On the other hand there do exist rather unknown programs and there exist doubtful download sources.
longshanks67 wrote:it will appear in the software manager and that I won't necessarily be able to distinguish A from B
In principle you are right, but there are some ways to find it out. The software manager does indeed hide too many information (one of the reasons, why I don't use / like it), the package manager (= synaptic) is more informative, if you look into the package properties. You can also use the software sources. If you mark a PPA inside, you can click the button to open the PPA. You will get there the list of packages, which the PPA offers. Note, that already installed packages do not appear there. The main purpose of this is do install software after adding a PPA on a quicker way.
Post Reply

Return to “Newbie Questions”