From 217eef1f33c5168aa37e1036b519107b3b225a03 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Thu, 20 Oct 2022 18:32:16 -0700 Subject: [PATCH] Update backup-bap --- backup-bap | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/backup-bap b/backup-bap index 09870ce..a27b270 100644 --- a/backup-bap +++ b/backup-bap @@ -4,13 +4,6 @@ echo -e "\nBAP Backup utility \n" BACKUP_PATH="/tmp" MOUNT_POINT="/media/usb" -#check if mount point exists -if [ ! -d “MOUNT_POINT” ] ; then - echo "USB not found" -else - echo "USB here do the work" -fi - # What to backup. remember the \ for new line continuation last line has none backup_files="${HOME}/pi-build \ ${HOME}/.config \ @@ -47,4 +40,17 @@ tar czf $BACKUP_PATH/$archive_file $backup_files echo -e "\nBackup finished\n" # Long listing of files in $BACKUP_PATH to check file sizes. ls -lh $BACKUP_PATH/$archive_file + +#handle archive or off pi copy + +#scp $BACKUP_PATH/$archive_file username@to_host:/remote/directory/ + +#check if mount point exists +if [ ! -d “MOUNT_POINT” ] ; then + echo "USB not found cant copy file off SD-CARD" +else + echo "USB found" + #cp $BACKUP_PATH/$archive_file $MOUNT_POINT + +fi #EOF