diff options
author | Britney Fransen <brfransen@gmail.com> | 2015-02-16 20:14:19 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2015-02-16 20:14:19 (GMT) |
commit | 0af9ef35dffa1cd67073102979cffefa876bd3c8 (patch) | |
tree | 7721518ca626705c9bc4f717c3e84c2a5ffcf484 /abs/core/LinHES-system | |
parent | fd00440460d6d5300d23fc5fafb0fccd18791f30 (diff) | |
download | linhes_pkgbuild-0af9ef35dffa1cd67073102979cffefa876bd3c8.zip linhes_pkgbuild-0af9ef35dffa1cd67073102979cffefa876bd3c8.tar.gz linhes_pkgbuild-0af9ef35dffa1cd67073102979cffefa876bd3c8.tar.bz2 |
LinHES-system: lh_system_backup_job: add status and remove verbose from tar
Diffstat (limited to 'abs/core/LinHES-system')
-rwxr-xr-x | abs/core/LinHES-system/PKGBUILD | 4 | ||||
-rw-r--r-- | abs/core/LinHES-system/lh_system_backup_job | 22 |
2 files changed, 15 insertions, 11 deletions
diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD index 914ce85..d6b4bac 100755 --- a/abs/core/LinHES-system/PKGBUILD +++ b/abs/core/LinHES-system/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-system pkgver=8.3 -pkgrel=8 +pkgrel=9 arch=('i686' 'x86_64') install=system.install pkgdesc="Everything that makes LinHES an automated system" @@ -93,7 +93,7 @@ md5sums=('8415c4b2587a8a1e6a312484c1edafcb' '33fbebbd546672cedd3c5e7350ab414e' 'c773d8caacba8fbd4968e8afe5137bc6' '3edef50a49a47694bf8add39cc160add' - '80b1e46cb4e4dda9dfb1a8c4c13dc909' + '8336874ee9e527f9799c3dec9fb770b5' 'bc69a520add58ede9b060c73e67ace13' '74e17d6f7453c52d56fecaed5c3f6ad5' '47e093e8cfe4b5b96602358e1f540832' diff --git a/abs/core/LinHES-system/lh_system_backup_job b/abs/core/LinHES-system/lh_system_backup_job index a286387..ca6800a 100644 --- a/abs/core/LinHES-system/lh_system_backup_job +++ b/abs/core/LinHES-system/lh_system_backup_job @@ -33,12 +33,15 @@ function backup_status_check(){ function backup(){ + echo echo "Starting Backup" mkdir -p $BACKUPDIR/$DATE #backup database if [ $SystemType = Master_backend -o $SystemType = Standalone ] then + echo + echo "Backup mysql databases" pacman -Q mysql 2>/dev/null if [ $? = 0 ] then @@ -57,20 +60,17 @@ function backup(){ echo " All databases in one file" mysqldump -x --all-databases > $BACKUPDIR/$DATE/all_databases backup_status_check $? - - - fi fi - #backup saved settings + echo "Backup saved settings" if [ -e /usr/MythVantage/templates/settings ] then cp -rp /usr/MythVantage/templates/settings $BACKUPDIR/$DATE/settings backup_status_check $? fi - #backup etc + echo "Backup etc" cp -rp /etc $BACKUPDIR/$DATE/etc if [ -e /var/lib/oss ] then @@ -78,7 +78,7 @@ function backup(){ backup_status_check $? fi - #backup func keys + echo "Backup func keys" cp -rp /etc/pki $BACKUPDIR/$DATE/pki if [ ! -f $MYTHHOME/backup_config/backup_exclude.txt ] @@ -87,6 +87,7 @@ function backup(){ touch $MYTHHOME/backup_config/backup_exclude.txt chmod 777 $MYTHHOME/backup_config/backup_exclude.txt fi + for i in ".mythtv/themecache" ".mythtv/remotecache" ".mythtv/Cache-myth*" ".cache" "tmp" ".vnc/*log" ".vnc/*pid" do grep -qF "$i" $MYTHHOME/backup_config/backup_exclude.txt @@ -97,17 +98,20 @@ function backup(){ fi done + echo "Backup home dirs" tar -zcf $BACKUPDIR/$DATE/home_dir.tar.gz -X $MYTHHOME/backup_config/backup_exclude.txt $MYTHHOME /home/vncsvc /home/xymon if [ -f $MYTHHOME/backup_config/backup_include.txt ] then + echo + echo "Backup items from $MYTHHOME/backup_config/backup_include.txt" tar -zcf $BACKUPDIR/$DATE/other.tar.gz -T $MYTHHOME/backup_config/backup_include.txt backup_status_check $? fi - #make_zip file + echo "Compress backup file" cd $BACKUPDIR - tar -zcvf $BACKUPDIR/backup.$DATE.tgz $DATE + tar -zcf $BACKUPDIR/backup.$DATE.tgz $DATE backup_status_check $? if [ -d $BACKUPDIR/$DATE ] then @@ -120,7 +124,7 @@ function backup(){ chown nobody:nobody /data/srv/httpd/htdocs/hobbit/notes/* 2> /dev/null >/dev/null fi echo - echo "Created file:" + echo "Created backup file:" echo " $BACKUPDIR/backup.$DATE.tgz" } |