diff options
author | Britney Fransen <brfransen@gmail.com> | 2012-03-05 23:18:05 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2012-03-05 23:18:05 (GMT) |
commit | 1d5d59f0eb21a192b4ed5516e0c5183809cf7735 (patch) | |
tree | 00e4a6b74db636d811411a4420e2a000fec7d8ec | |
parent | 7bd4ef8f711aa91d1657b38f1371839c46012f59 (diff) | |
download | linhes_pkgbuild-1d5d59f0eb21a192b4ed5516e0c5183809cf7735.zip linhes_pkgbuild-1d5d59f0eb21a192b4ed5516e0c5183809cf7735.tar.gz linhes_pkgbuild-1d5d59f0eb21a192b4ed5516e0c5183809cf7735.tar.bz2 |
LinHES-system: lh_system_backup_job: remove backups older than 21 days
-rw-r--r-- | abs/core/LinHES-system/PKGBUILD | 4 | ||||
-rw-r--r-- | abs/core/LinHES-system/lh_system_backup_job | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD index 6e3649e..1734865 100644 --- a/abs/core/LinHES-system/PKGBUILD +++ b/abs/core/LinHES-system/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-system pkgver=2 -pkgrel=36 +pkgrel=37 arch=('i686') MVDIR=$startdir/pkg/usr/LH BINDIR=$startdir/pkg/usr/bin @@ -66,7 +66,7 @@ md5sums=('d6a564f3286590875874573107940908' '962a3e9eaba2d1466251b7ab0956705d' 'd03aedeeeda0f5e9c1eb437411c88477' '94ce8f1d5085c0db7b267db8c2e9a3ff' - '3db82bd7b9234fc941e4a53b464e0d46' + '16a2a3347961517fe7d95a2956a091a6' '9c2294ccfd5359583497a6b03d918a27' '859a80ddb4c234506379c605114c1343' '47e093e8cfe4b5b96602358e1f540832' diff --git a/abs/core/LinHES-system/lh_system_backup_job b/abs/core/LinHES-system/lh_system_backup_job index 3abd5f9..61b05d7 100644 --- a/abs/core/LinHES-system/lh_system_backup_job +++ b/abs/core/LinHES-system/lh_system_backup_job @@ -8,6 +8,7 @@ echo "Starting backup " . /etc/profile . /etc/systemconfig BACKUPDIR=/myth/system_backups +DELETE_DAYS=21 DATE=`date +%F_%H-%M` mkdir -p $BACKUPDIR/$DATE @@ -39,10 +40,10 @@ if [ -f /data/srv/hobbit/server/ext/hbnotes.py ] then /data/srv/hobbit/server/ext/hbnotes.py chown nobody:nobody /data/srv/httpd/htdocs/hobbit/notes/* 2> /dev/null >/dev/null - - fi +#remove old backups +find $BACKUPDIR/backup*.tgz -type f -mtime +$DELETE_DAYS -delete #Remote copy if [ x$RemoteBackup = x1 ] |