![]() |
Hack to backup apps packages
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"}; 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. |
Re: Hack to backup apps packages
http://talk.maemo.org/showthread.php?p=1262280
noob question, is it has same goal? Thx btw, :) |
Re: Hack to backup apps packages
Quote:
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). |
Re: Hack to backup apps packages
Great! Thx.
|
Re: Hack to backup apps packages
How about making a backup of INSTALLED apps?
|
Re: Hack to backup apps packages
Quote:
Other choice could be to reinstall app (remove & reinstall if from Store, or 'apt-get --reinstall install' from command line) |
Re: Hack to backup apps packages
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? |
Re: Hack to backup apps packages
Quote:
|
Re: Hack to backup apps packages
Okay got it, it's actually apt.conf.d and not apt-conf.d
|
Re: Hack to backup apps packages
1 Attachment(s)
Quote:
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. |
Re: Hack to backup apps packages
Hi! After installation of this package all other packages (not from Store) is not installing (error "Installation aborted"). Please, check it and fix )
|
Re: Hack to backup apps packages
Try with this line:
Code:
Dpkg::Pre-Install-Pkgs {"BKPDIR=/home/user/MyDocs/AptBackup/; if [ ! -d $BKPDIR ]; then mkdir -p $BKPDIR; fi; while read pkg; do cp $pkg $BKPDIR; done"}; |
Re: Hack to backup apps packages
Hi
I added auto-backup to N9QT (thanks to minimos & peterleinchen). It also have option to create icon on the desktop for quick ON/OFF :) |
Re: Hack to backup apps packages
modified aptbackup script to be more flexible ;)
aptbackup.sh automatically changing file extension to .deb before copying /etc/apt/apt.conf.d/02backup Code:
Dpkg::Pre-Install-Pkgs {"while read pkg; do /home/user/aptbackup.sh $pkg; done"}; Code:
#!/bin/sh |
Re: Hack to backup apps packages
Quote:
|
Re: Hack to backup apps packages
Hmmm...
You mean if previous file looks like: Code:
echo 'Dpkg::Pre-Install-Pkgs {"BKPDIR=/home/user/MyDocs/Downloads/OVIcatch; if [ ! -d $BKPDIR ]; then mkdir -p $BKPDIR; fi; while read pkg; do cp $pkg $BKPDIR; done"};' > /etc/apt/apt.conf.d/02backup Code:
echo 'Dpkg::Pre-Install-Pkgs {"while read pkg; do /home/user/aptbackup.sh $pkg; done"};' > /etc/apt/apt.conf.d/02backup I'm right ? PS. Checked, it work perfectly :) |
All times are GMT. The time now is 13:13. |
vBulletin® Version 3.8.8