I use a couple of third party launchpad ppa repositories (mercurial, tortoisehg, medibuntu, etc.). I was wondering if there was a way (preferable a script) that would allow me to back up the ppa's and then later restore them? This would be very handy after a clean install of my system. Currently I can backup my package listing through synaptic but I can't restore it because I have to have the ppa's in place first. asked 16 May '10, 11:54 Troy |
I ended up writing a small shell script that uses:
The information was from here. For this to work you need to install:
After a clean install I'll be able to run the shell script and the ppa's that I use will be updated. answered 17 May '10, 12:07 Troy |
I would suggest learning and using PERL. I'm not good enough to tell you off the top of my head, but scripts that do similar things as you ask are available online and can be modified to suit. I'm learning this useful tool (PERL) myself -- not so much because I want to, but because it makes life easier. answered 21 May '10, 12:29 hilyard Any language would work well. I would probably write this in python.
(22 May '10, 11:36)
Troy
|
Just copy the /etc/apt/sources.list file to a location, then after install copy it back and you will have all your ppa's referenced.
A lot easier than re-adding the PPA's after. This also has the advantage that it will also retain any additional, non-launchpad repositories you may have added. answered 19 May '10, 11:20 Gareth How would this work for a new version of the operating system. I upgraded from Ubuntu Karmic to Lucid and there are ppas for both karmic and lucid in sources.list.d. I had to add the ppa's again after the upgrade. I imagine if I copied my backup, I would still have to add the ppa's. Is there a way around this?
(19 May '10, 12:29)
Troy
|
If you use the command It contains all information for this ppa. So just back up this folder, restore it and you're done:
To re-use the ppa you defined in
Note that you will have duplicates in your sources list! So review it before installing new software! Good luck! answered 17 May '10, 13:09 guerda That looks interesting. I'll have to try it out
(18 May '10, 01:22)
Troy
|
It would be great if you could accept the answer that mostly fit to you. It gives you and the answering person reputation points. See the FAQ for details.
Please accept an answer, or provide more details so we can help.