diff options
Diffstat (limited to 'linhes/linhes-system/lh_system_backup_job')
-rwxr-xr-x | linhes/linhes-system/lh_system_backup_job | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linhes/linhes-system/lh_system_backup_job b/linhes/linhes-system/lh_system_backup_job index f634589..536d105 100755 --- a/linhes/linhes-system/lh_system_backup_job +++ b/linhes/linhes-system/lh_system_backup_job @@ -27,7 +27,7 @@ do fi done -if [ ! `mountpoint -q $BACKUPDISK 2> /dev/null` ]; then +if [ `mountpoint -q $BACKUPDISK 2> /dev/null` ]; then echo " The system doesn't have a second drive. Backup skipped." exit $backup_status fi @@ -139,19 +139,19 @@ function backup(){ echo "Backup home dirs" HOMEDIRS="" - tar -zcf $BACKUPDIR/$DATE/home_dir.tar.gz -X $MYTHHOME/backup_config/backup_exclude.txt $MYTHHOME $HOMEDIRS + tar -I pigz -cf $BACKUPDIR/$DATE/home_dir.tar.gz -X $MYTHHOME/backup_config/backup_exclude.txt $MYTHHOME $HOMEDIRS 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 + tar -I pigz -cf $BACKUPDIR/$DATE/other.tar.gz -T $MYTHHOME/backup_config/backup_include.txt backup_status_check $? fi echo "Compress backup file" cd $BACKUPDIR - tar -zcf $BACKUPDIR/backup.$DATE.tgz $DATE + tar -I pigz -cf $BACKUPDIR/backup.$DATE.tgz $DATE backup_status_check $? if [ -d $BACKUPDIR/$DATE ] then @@ -245,14 +245,14 @@ function remote_backup(){ if [ -n "$SECBACKUPDISK" ]; then SECBACKUP=$SECBACKUPDISK/backup - if [ `mountpoint -q $SECBACKUPDISK 2> /dev/null` ]; then + if [ ! `mountpoint -q $SECBACKUPDISK 2> /dev/null` ]; then if [ ! -d "$SECBACKUPDIR" ]; then mkdir -p -m 775 $SECBACKUPDIR echo " Created $SECBACKUPDIR" chown mythtv:users $SECBACKUPDIR fi echo " Copying system backups to $SECBACKUPDIR" - rsync -au --delete $BACKUPDIR $SECBACKUPDIR + rsync -au --delete $BACKUPDIR/ $SECBACKUPDIR/ else echo " $SECBACKUPDISK isn't mounted." fi |