summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2013-01-23 23:51:50 (GMT)
committerJames Meyer <james.meyer@operamail.com>2013-01-23 23:51:50 (GMT)
commit777eac25810b40d03602036f3a28466d0db83adc (patch)
treefa73ed2fbcd5f6bdde62ef44fa1ec107252a11a8
parent4c6b25b96807b5da63685854acd005795898744d (diff)
downloadlinhes_pkgbuild-777eac25810b40d03602036f3a28466d0db83adc.zip
linhes_pkgbuild-777eac25810b40d03602036f3a28466d0db83adc.tar.gz
linhes_pkgbuild-777eac25810b40d03602036f3a28466d0db83adc.tar.bz2
linhes-system: add additional stuff to the system backup and also introduced an exclude file.
The exclude/include files are locate in /home/mythtv/backup_config/ new includes are: /home/vncsvc /home/xymon refs #897
-rwxr-xr-xabs/core/LinHES-system/PKGBUILD2
-rw-r--r--abs/core/LinHES-system/lh_system_backup_job24
2 files changed, 22 insertions, 4 deletions
diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD
index 855090e..273a17d 100755
--- a/abs/core/LinHES-system/PKGBUILD
+++ b/abs/core/LinHES-system/PKGBUILD
@@ -95,7 +95,7 @@ md5sums=('d1f60851cb319921f3b7ad044d6f6332'
'692563448cca1d49f45e7d1c8abcaa0c'
'962a3e9eaba2d1466251b7ab0956705d'
'1758aed160de64abfafb28a3a8f3390e'
- '323048b6c1e17106830e66e7f935e747'
+ 'a19d010af99a3b0a9d826e6fd6a5b45f'
'6b2640772d89195cd6fa3db134142951'
'1be1d3dfc83f828eede93055713882ae'
'47e093e8cfe4b5b96602358e1f540832'
diff --git a/abs/core/LinHES-system/lh_system_backup_job b/abs/core/LinHES-system/lh_system_backup_job
index 98d4168..3a13ade 100644
--- a/abs/core/LinHES-system/lh_system_backup_job
+++ b/abs/core/LinHES-system/lh_system_backup_job
@@ -2,7 +2,6 @@
#process that uses this system backup script
# - myth_mtc.py
# - supplemental web, process.py backup
-
MYTH_RUN_STATUS="1"
. /etc/profile
. /etc/systemconfig
@@ -25,11 +24,30 @@ function backup(){
#backup etc
cp -rp /etc $BACKUPDIR/$DATE/etc
- cp -rp /var/lib/oss $BACKUPDIR/$DATE/oss
+ if [ -e /var/lib/oss ]
+ then
+ cp -rp /var/lib/oss $BACKUPDIR/$DATE/oss
+ fi
#backup func keys
- cp -rp /etc/pki $BACKUPDIR/$DATA/pki
+ cp -rp /etc/pki $BACKUPDIR/$DATE/pki
+ if [ ! -f $MYTHHOME/backup_config/backup_exclude.txt ]
+ then
+ mkdir -p $MYTHHOME/backup_config/
+ echo ".mythtv/themecache" > $MYTHHOME/backup_config/backup_exclude.txt
+ echo "tmp" >> $MYTHHOME/backup_config/backup_exclude.txt
+ echo ".vnc/*log" >> $MYTHHOME/backup_config/backup_exclude.txt
+ echo ".vnc/*pid" >> $MYTHHOME/backup_config/backup_exclude.txt
+ chmod 777 $MYTHHOME/backup_config/backup_exclude.txt
+ fi
+
+ 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
+ tar -zcf $BACKUPDIR/$DATE/other.tar.gz -T $MYTHHOME/backup_config/backup_include.txt
+ fi
#make_zip file
cd $BACKUPDIR