Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 21986 ideas, 135057 comments, 2615221 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #25839: Save my programs list!

bug This idea was marked as implemented the 31 October 11.
Written by cajhne the 13 Sep 10 at 21:35. Related project: Synaptic package manager. Status: Implemented
Rationale
Having to remember/reinstall all my programs from scratch is pain! I get experimental with Linux, I mess something up, I blow something away, and I have to start all over. sudo apt-get install ad-nauseum! I want my programs back, I always install the same set every time. I don't want to install it all by hand again! I also don't want to go through the bother of making duplicates of my active file-system to restore. I just want clean installs of everything, without trying to remember everything, and tracking down the correct apt package.

Note: This is NOT a duplicate of "system backup/restore" ideas. We're not saving anything here but the /bare minimum/ to reinstall. Think along the lines of something you could toss on a thumbdrive, not something that takes a pile of backup DVDs, and/or large capacity external drives. :)

216
votes
implemented
Selected solution (#2): Add program backup/restore functionality in Synaptic/Ubuntu Software Center
Written by cajhne the 14 Sep 10 at 21:39.
I propose a two-fold solution:

1.Keep a list of installed programs in the form of a bash-script, or executable file that includes the programs installed by the user. This happens behind the scenes without any intervention or activation from the user. Add a button to synaptic package manager (and Ubuntu Software Center) that says "Backup My Programs" or some such language. When the user clicks this, a dialogue appears that allows the user to save the bash-script/executable file to a location (such as a backup disk, thumb drive, or any convenient folder.) A message appears after the save is complete that informs the user that they can run the script/executable file upon re-install, to re-download/restore their programs.

2.In addition to the above, it would be supremely awesome if one could click on a "save programs to archive" (or something like that) button, get the executable mentioned above and a compressed archive of the installer files (and dependencies) for the user-installed programs. The script would first search the archive for a suitable candidate, then the network if the versions in the archive are too old, or a new version is available. If the versions are the same, then download bandwidth could be saved by installing from the archive.

I can work up a visual on these if there's enough interest.

Things to note:
1.The "save to archive" button would take deb packages and dependencies from the files that are automatically saved to disk: var/cache/apt/archives, and make an archive to accompany the script. If the deb packages have been purged, the version available in the software channel will be re-downloaded and added to the archive in place of the missing deb, then deleted from cache once more.

2.This should not get in the way of anything. It should change no defaults either.

And that's about it! :) I want to run that script/executable, and get a cup of coffee whilst all my programs reinstall. Oh the bliss!
148
votes
implemented
Selected solution (#3): Add "Remember my program choices" to Ubuntu Software Center
Written by cajhne the 14 Sep 10 at 21:58.
A button that lets you save your choices to a script file or list, (or maybe directly to ubuntu one), that you can then "reinstall my programs" later through a simmilar button or menu option in ubuntu software center.
50
votes
implemented
Selected solution (#4): Ubuntu One software title sync + solution 2
Written by Oxwivi the 24 Sep 10 at 18:00.
Having Ubuntu One save the list of softwares used by the users can do the trick. It will just download the softwares from the repository and keep a back up of the non-repository softwares at their server, occupying the space designated to the user.

Setting up the Ubuntu One account during installation of Ubuntu at a computer can allow only the softwares the user wants to be installed. Thus saving time to remove the unnecessary programs to save space and resources (in an old system for example).
-33
votes
implemented
Selected solution (#5): Add A Prompt On Shutdown To Save installed programs
Written by peapodamus the 6 Oct 10 at 00:29.
Add a prompt so that when the user tells Ubuntu to shutdown it asks if you want to save all the programs and .DEB files to the hard drive or to an external media device and add a program in Ubuntu to allow fast re-installation of the DEB files.
2
votes
implemented
Selected solution (#6): Autosave manually installed packages list in all sudoers home folders
Written by briceparent the 13 Oct 10 at 08:09.
As all sudoers may access the software center and the others ways of installing packages, they should all be able to reinstall them at once.
So, as in idea #1, a simple bash script should be generated everytime a package is added / stuck to a version / removed, to repeat all the actions to set up the computer.
It should be copied in a file like ~/.apt/[computer_name].sh, allowing the sudoers user to share the folder using Ubuntu One and to install the packages that are installed on one of the user's computers.
Also, it should only list the packages that are manually installed, and not the dependencies, allowing installations on newer or older versions of the distribution, possibly with verifications and notifications for packages that are no more / not already present in the list.

Attachments
No attachments.


Duplicates


Comments
cheesehead (Brainstorm admin) wrote on the 14 Sep 10 at 12:04
What's wrong with the existing tools, including Mondo and Jablicator, that make system restore easy?

cajhne wrote on the 14 Sep 10 at 19:41
Probably nothing "wrong" with those programs. I'd like this functionality built into synaptic package manager and ubuntu software center to make it easy to get the applications you use back, on a fresh install. It seems intuitive and logical to include this functionality in synaptics package manager/ubuntu software center, because it's right in-line with what a package manager does: manage packages. :)

Also, the above solution ensures that old config files which might not work on a new system/distro aren't "backed up" along with the rest, and new packages are found to replace the out of date ones. A clean install is less likely to have issues, and if a program was causing the issues that trashed your system, you don't want to restore those (Compiz, I'm looking at you!). :) (PS- I love Compiz, so don't flame me. I just mess with it a lot.)

This solution also adds simple functionality without the overhead of learning other, potentially quite complex backup systems, when they just want a simple solution for this one issue. I think it's a common enough thing to warrant the extra feature, and light enough not to get in the way of anything that's already there.

Thanks for your consideration! :)

cajhne wrote on the 14 Sep 10 at 20:16
Looks like Mondo backs *everything* up. I don't want to back everything up, I just want Synaptics to remember which programs I had installed and re-install them from repo or .deb. This requires much less backup space than making a complete copy of the active filesystem. In my case, small enough to include on my 8GB partitioned ubuntu usb key. I would never have the space to use Mondo for backup, and I don't want to restore a whole filesystem from CDS, DVDs, etc. If Mondo can make backups as I've described in my solution, it isn't obvious from the documentation.

I couldn't even find a turorial or online reference for jablicator, but I hit a lot of "jablicator failed" in this or that respect, all over the web. One was a post from the creator of Jablicator asking if it should even be included in the documentation. :P What I did find out was that jablicator makes it easy to share your installed applications by creating an apt-gettable package. That's pretty cool, but not what I want to do here.

I want to press a button (one button) in Synaptics or Ubuntu software centre, and have it do as described in my solution. Even if there's a program that does that, I STILL want it in Synaptics/Ubuntu software centre. :) That's where I think it belongs to be the most useful, visible and accessible.

I guess my main point is, I don't want another application to handle something that it would be easy for Synaptics Package Manager to include in its own function set. It already handles the dependencies, the repos, everything. I just need my button or two. :)

RainCT (Ubuntu developer) wrote on the 14 Sep 10 at 21:23
I've un-duplicated this from #1230 since the later talks about restoring "system settings" involving a backup of /etc or similar solutions.

This idea however is about saving the selection of installed packages.

McIvor wrote on the 14 Sep 10 at 21:31
Synaptic already has an option to save the list of packages. It's called "Save Markings". You can then import the list into Synaptic using "Read Markings." Also, right below this in the menu is the option "Generate package install script" which - if I remember correctly - will create a shell script to install every package currently installed.

cajhne wrote on the 14 Sep 10 at 21:50
Cool, thanks McIvor! Can we put that in Ubuntu Software Center too? Also, I couldn't find a solution for part two of the solution I listed. Can we make a backup tarball out of all the installed programs, so we don't have to have internet access to get our programs back right away?

Darwin Survivor (Brainstorm moderator) wrote on the 15 Sep 10 at 01:51
I'm pretty sure apt-get (or aptitude) can output a list of all installed packages. That list can then be cut (remove hard-returns) and fed into an apt-get install command. A 4 line shell script could probably implement this.

veko wrote on the 15 Sep 10 at 07:07
dpkg can do that rather easily:

#Get list of installed packages
dpkg –get-selections > mypackages.txt

#Reinstall all the packages
sudo dpkg –set-selections < mypackages.txt
sudo apt-get dselect-upgrade


And as mentioned, synaptic already has this nice feature, but it would be nice to have it in Software Center too.

Akerbos wrote on the 15 Sep 10 at 15:23
How can such features perform when packages are no longer available or renamed?

Akerbos wrote on the 15 Sep 10 at 15:24
Myself, I tend to use a point of reinstall also as a rejuvenation point. Machines get clogged up with packages you do not need, really. I would only install what I need when I need it.

cajhne wrote on the 15 Sep 10 at 17:43
@Akerbos: The feature should handle errors gracefully. What happens when you apt-get something that's been renamed, or is no longer maintained in the repos? Same thing. It prints an error message, and continues installing what it can, or comes up with a list of what wasn't found, so you can go look for those items yourself, install the new versions, and hit the "save" button again to save your list or programs.

@Akerbos: I can appreciate the wisdom of manually reinstalling everything to rejuvenate things. I usually save that sort of zen for when a new distro comes out. It's like xmas and hell all wrapped into one! :D Usually when I have to reinstall though, it's the same distro, same programs, and I just want to get back to work. My primary concern is what I can get done with Ubuntu, and how fast I can do that. That's the main reason I switched from Windows. What Ubuntu actually does behind the scenes is secondary to that goal for me.



cajhne wrote on the 15 Sep 10 at 17:49
@DarwinSurvivor: Neat trick. I don't want to do any of that, and I wouldn't expect people to figure it out. If it can all be done via shell script, neat. Let's suggest a button that runs that script on the back-end. Also, I don't want it to install every single package that's already installed. I want it to keep track of the ones I've personally installed, and back those ones up. A fresh install will install most of the other stuff. All I want is what I've personally chosen to install. Lightweight, simple, space saver. Toss it on a (cheap) thumb drive, and we're good to go! :D

cajhne wrote on the 15 Sep 10 at 17:53
@veko: Cool! Let's give it to Ubuntu Software Center! :D

aliam13_2 wrote on the 16 Sep 10 at 15:45
I think we should also think about what happens with dependencies.

Lets say you install package A which needs packages B and C. You then back up the "list of installed software"

Then you move to a new Ubuntu (new release). Lets say the packages names have not changed, but A only depends on B now and not C.

When you restore your backed up "list of installed software" I guess the most reasonable thing to happen is that packages A and B only are installed. This comes from the idea that C was only needed to use A. As C is now not needed then it should not be installed (unless its a dependency in the same was to another package).

However I guess the current way with the scripts above will install packages A,B and C as they just get a list of what is installed and not what the user wanted to install (top level packages in a way).

This is my guess and I may be completely wrong. But we should at least think about this.

cajhne wrote on the 17 Sep 10 at 15:49
@aliam13_2: Have you ever installed something through Synaptics, or Ubuntu Software Center that corrupted some other bit of software, because of dependencies? I don't think I ever have. :) That's because Synaptic handles the dependencies and conflicts. The auto-generated script not only saves the programs you choose, it also saves the order in which you installed them too, so even if there were a conflict amongst A B and C, you successfully installed them before in that order, why would it be broken now? :)

More to the point: Basically, I want to expand on the Ubuntu Software Center's "App Store/Market" metaphor to include backup for the choices made. I assume the developers know a lot more about how that actually would work than I do (or ever will).

If it's reasonable to assume it can be done (in some way), it's reasonable to vote +1 for this idea if it's something desirable to you. :)

Darwin Survivor (Brainstorm moderator) wrote on the 17 Sep 10 at 21:49
@cajhne Part of my point with the shell script thing is that if it can be done that easily in a shell script, it shouldn't be very hard to implement it into the sofware center. :D

h.vinay wrote on the 18 Sep 10 at 06:52
Nice idea, I was looking for something like this!!

cajhne wrote on the 19 Sep 10 at 10:59
@DarwinSurvivor: I appreciate the info! :) The intention is not always clear from the context.

I've found that some people will post solutions involving scripts, or complex series of commands to remember, and then vote down an idea thinking it's already solved based on the fact that they can do it. :) Glad to have your support and ideas!

@h.vinay: Thanks! Software Center reminds me a lot of Android Market on my phone. I always thought it would be useful to be able to save program choices. Since the Ubuntu folks had the vision to implement this, I thought I'd suggest this same feature that I'm still missing in Android.

aliam13_2 wrote on the 20 Sep 10 at 10:06
@cajhne: I think this is a good idea and is needed. I think you misunderstood my point however. I am not talking about breaking packages and dependencies. Let me try and explain briefly without going into the details like last time. When you backup your program list, you are only interested in what programs you wanted installed in the first place, you do not care about the dependencies. So when you restore the package list, you again don't care about the dependencies as long as your programs work. If they could work with less dependencies in the new environment then there is no need to install all the original dependencies, just enough to get the programs working. I hope that explains better.

In my original post. The package C was not a conflict. It would have been installed in the new system even though it was not needed from the users point of view where the user only wants to get A working. The C package is just wasting storage space in the new system, but does not cause any conflict or bad things to happen.

mydoghasworms wrote on the 20 Sep 10 at 19:53
I like the idea of backing it up the list of programs to Ubuntu One. In fact, I think so much more could be done with Ubuntu One, and this is just one of those things. Lateral thinking is needed!

robvb wrote on the 26 Sep 10 at 19:31
There is a package called cruft remover or computer janitor, this is the same I think. If you remove something in synaptic you can choose for removel (saved settings will not be removed!) or compleet removal (this will remove everything!)

cajhne wrote on the 29 Sep 10 at 19:12
@aliam13_2: Thanks for your support. :) I did understand what you meant. I was trying to explain why I don't think it's a problem: Whenever you apt-get install a package, for instance, you're downloading from repositories the program and all the dependencies, for the most recent version of the program. I'm not entirely sure, but I'd assume that any outdated or superfluous packages simply don't get installed. This is the advantage of saving the list of programs instead of the actual program files. You just have a script apt-get install each item on the list, and you're no worse off than if you'd typed it yourself. I would like the option to have the the current programs tarballed, in case I don't have connection. That's really a separate issue, and is more of a nice feature. I think what's really useful is the program list, since most people probably aren't going to care about having copies of the install files archived. I'd be happy with just the program list to be honest. This is why I added the second solution above, which presently is only slightly less popular. :) Thanks for taking the time to reply and correct any misconceptions/misreadings I may have regarding your comments. :)

@mydoghasworms: Completely agree! My only requirement is that it not be based solely on Ubuntu One; I don't want to HAVE to use Ubuntu One to back up my program list, but the option is very attractive, and to be honest, I probably would, anyway if the option existed. :D


cajhne wrote on the 29 Sep 10 at 19:35
I'm not presently a fan of #4, mainly because it relies on making the user sign up for Ubuntu One to save their program files, and also I'm not sure I want all my Ubuntu One space taken up by non-repo install files. There's only 2 gigs of free space. I think just saving the program list would be enough, and would take a trivial amount of space on the server... that said, I don't see a problem with making it an option at install. A "backup/restore my programs with Ubuntu One" checkbox would probably work, along with a "what's this?" link with more information about Ubuntu One.
I'll reconsider my vote for #4 if the wording is changed to reflect the "optional" part of this revision, along with more specifics about where in the install process it would be located, and selected. I think the basis for it is a good idea, because it would make the option more visible to beginning users.

Darwin Survivor (Brainstorm moderator) wrote on the 29 Sep 10 at 21:27
Regarding #4, what is the point of keeping copies of software packages in ubuntu one (canonical's) servers when they are already in the repo (*also* canonical's servers)? If it was a local copy, I would understand, but if it's in ubuntu one, caonical is just going to end up saving 50,000 of all the main applications in all sorts of revisions and almost completely destroy the entire point of repositories.

Saving the list there (with option to save locally) would be much better.

obulpathi wrote on the 30 Sep 10 at 20:21
How about if we can share our software package list and configuration publickly? This can lead to a solution similar to Suse Gallery (http://susegallery.com/) but with out actually storing all the different CD's. Just store the configuration files and software list. Say I am a android developer. I can install all the android development tools and configure them. Then share this configuration details and software list to everyone (like google docs public feature or using PPA ??). If someone wants to start with android development, they can install Ubuntu and apply my configuration to their system and they are ready to go! Think of the same for web developer, security expert, etc ...

cajhne wrote on the 2 Oct 10 at 18:54
@Darwin Survivor: #4 wants to keep the "non-repo" install files in ubuntu one. Which I think is a good option for the more obscure bits of software that you have to hunt down install files for manually. Although I don't have too many of those (I tend to keep my own backups of those install files), I don't see the harm in including the option as part of a complete (light-weight) program restore solution. #4 offers one extra feature that the others don't cover, making a more complete backup solution. It may be a slightly separate problem, though, and might be better filed under the Ubuntu One section for suggestions, whereas this set of solutions deals with Synaptic and Software Centre.

cajhne wrote on the 2 Oct 10 at 19:18
@obulpathi: I don't think that's a bad idea. However I don't think it solves the same problem as we're trying to solve here. You may want to post that idea separate from this idea, and accumulate votes for it there. :) While I think it's a good idea, it complicates the issue of backing up the program list. I'm a very private person, for example, and would be a bit upset if my program setup and settings were up on display for everyone to see/use, so I don't think it should be an automatic feature of the list backup additions we are suggesting here. It also complicates the solution. Several folks (thanks again!) suggested simple scripts that can be added to Software Centre to implement the solution, but if start adding a bunch of sharing options to it, it encourages scope-creep, and all of a sudden, our simple, clean, easy, effective solution takes too long, and isn't implemented because there just isn't time to do it all, with all the bells and whistles. :) Try posting it as a separate idea, though. I'll bet you could get support for it pretty easily. :)

obulpathi wrote on the 2 Oct 10 at 21:10
@cajhne: I am sure it would be a bad idea to post everyones software list and configuration files to public. But if the user wishes to share, then we can make it public. And yeah, I will post it as a separate idea.

Darwin Survivor (Brainstorm moderator) wrote on the 3 Oct 10 at 01:46
@cajhne Ah, my bad. That actually sounds like a very good idea actually.

bel3atar wrote on the 16 Feb 11 at 10:48
A prompt asking for restoring in the installer would be nice

yooozy wrote on the 11 Aug 11 at 03:45
this idea is easy to implement since it can be done manually as Veco suggest.

auto sync the tiny file to Ubuntu One then give a hand to USC that's all



Post your comment