Active Topics

 


Reply
Thread Tools
Posts: 646 | Thanked: 1,124 times | Joined on Jul 2010 @ Espoo, Finland
#1
I think I found a simple way of saving a copy of any installation package (whether coming from Nokia Store or manual apt-get command), at installation time.
It is a one line hack, so I'm not going to wrap it into a user-installable package.

So, open a terminal session as root, go to /etc/apt/apt-conf.d/, launch your favorite editor and create a file named "02backup" containing the following:
Code:
Dpkg::Pre-Install-Pkgs {"BKPDIR=/home/user/MyDocs/AptBackup/; mkdir -p $BKPDIR; while read pkg; do cp $pkg $BKPDIR; done"};
That's all.
Since the next installation, a directory /home/user/MyDocs/AptBackup/ should be created and all packages should be copied there.
I haven't tested with packages that download dependencies, but I believe also said dependencies will be 'backupped'.
Note: you may want to disable this feature if you are going to upgrade to a newer PR release, otherwise your upgrade will be slow and your storage getting filled.
 

The Following 18 Users Say Thank You to minimos For This Useful Post:
ibrakalifa's Avatar
Posts: 1,583 | Thanked: 1,203 times | Joined on Dec 2011 @ Everywhere
#2
http://talk.maemo.org/showthread.php?p=1262280
noob question, is it has same goal? Thx btw,
__________________
~$
~#
 
Posts: 646 | Thanked: 1,124 times | Joined on Jul 2010 @ Espoo, Finland
#3
Originally Posted by ibrakalifa View Post
http://talk.maemo.org/showthread.php?p=1262280
noob question, is it has same goal? Thx btw,
It seems that backdeb tries to repackage an app, kind of 'regenerating' the installation package.
What I'm proposing instead is to save the original package 'as is' at installation time (plus, no special action is needed to do that).
 

The Following User Says Thank You to minimos For This Useful Post:
Posts: 32 | Thanked: 1 time | Joined on Mar 2012
#4
Great! Thx.
 
Posts: 31 | Thanked: 2 times | Joined on May 2012
#5
How about making a backup of INSTALLED apps?
 
Posts: 646 | Thanked: 1,124 times | Joined on Jul 2010 @ Espoo, Finland
#6
Originally Posted by mapl View Post
How about making a backup of INSTALLED apps?
You use the application mentioned in ibrakalifa's post.
Other choice could be to reinstall app (remove & reinstall if from Store, or 'apt-get --reinstall install' from command line)
 
Posts: 198 | Thanked: 130 times | Joined on Sep 2012 @ Pakistan
#7
I try to cd to /etc/apt/apt-conf.d/ as Root but it says

sh: can't cd to /etc/....

I made the file using nano nd tried to copy it to the said location using FileBox. but it says Permission denied

any help?
 
Posts: 646 | Thanked: 1,124 times | Joined on Jul 2010 @ Espoo, Finland
#8
Originally Posted by khan.orak View Post
I try to cd to /etc/apt/apt-conf.d/ as Root but it says

sh: can't cd to /etc/....
You must have mistyped something, there are no problems in accessing /etc/ directory, even as non-root.
 
Posts: 198 | Thanked: 130 times | Joined on Sep 2012 @ Pakistan
#9
Okay got it, it's actually apt.conf.d and not apt-conf.d
 
Posts: 17 | Thanked: 24 times | Joined on Feb 2013
#10
Originally Posted by minimos View Post
I think I found a simple way of saving a copy of any installation package (whether coming from Nokia Store or manual apt-get command), at installation time.
It is a one line hack, so I'm not going to wrap it into a user-installable package.

So, open a terminal session as root, go to /etc/apt/apt-conf.d/, launch your favorite editor and create a file named "02backup" containing the following:
Code:
Dpkg::Pre-Install-Pkgs {"BKPDIR=/home/user/MyDocs/AptBackup/; mkdir -p $BKPDIR; while read pkg; do cp $pkg $BKPDIR; done"};
That's all.
Since the next installation, a directory /home/user/MyDocs/AptBackup/ should be created and all packages should be copied there.
I haven't tested with packages that download dependencies, but I believe also said dependencies will be 'backupped'.
Note: you may want to disable this feature if you are going to upgrade to a newer PR release, otherwise your upgrade will be slow and your storage getting filled.
Here is a Debian package that achieves the exact same thing (I just found this thread). Thanks minimos for this great idea!

P.S. You can append filenames with .deb after they are copied to the AptBackup folder. This will cause filebox, etc to show the proper icon.
Attached Files
File Type: deb aptbackup-1.0.deb (1.0 KB, 115 views)

Last edited by mubuntu; 2013-02-10 at 05:15.
 

The Following 5 Users Say Thank You to mubuntu For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:08.