]> piware.de Git - bin.git/blob - preinst-backup
add backup/restore scripts
[bin.git] / preinst-backup
1 #!/bin/sh -ex
2
3 CURBACKUP=`ls -t /var/backups/pibackup/full* | head -n 1`
4 [ -e "$CURBACKUP" ] || {
5     echo no current full backup in /var/backups/pibackup
6     exit 1
7 }
8 cp $CURBACKUP /home/
9
10 apt-get autoclean
11 mkdir -p /home/aptcache
12 rm -rf /home/aptcache/*
13 cp /var/cache/apt/archives/*.deb /home/aptcache/
14