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