/usr/local/directadmin/scripts/custom/user_backup_post.sh
#!/bin/sh
#where do you want to save the Google Driver copy?
SAVE_PATH=/home/admin/admin_backups
BACKUP_PATH='echo $file | cut -d/ -f1,2,3,4,5'
REQUIRED_PATH=/home/admin/admin_backups/tmp
if [ "$BACKUP_PATH" = "$REQUIRED_PATH" ]; then
NEW_FILE=${SAVE_PATH}/'echo $file | cut -d/ -f6-'
/usr/sbin/rclone move $file "remote:$NEW_FILE"
fi
exit 0;
But can not work, how to move all then backup from directadmin ?
#!/bin/sh
#where do you want to save the Google Driver copy?
SAVE_PATH=/home/admin/admin_backups
BACKUP_PATH='echo $file | cut -d/ -f1,2,3,4,5'
REQUIRED_PATH=/home/admin/admin_backups/tmp
if [ "$BACKUP_PATH" = "$REQUIRED_PATH" ]; then
NEW_FILE=${SAVE_PATH}/'echo $file | cut -d/ -f6-'
/usr/sbin/rclone move $file "remote:$NEW_FILE"
fi
exit 0;
But can not work, how to move all then backup from directadmin ?