System Backup post script (all_backup_post.sh) ?

MaXi32

Verified User
Joined
Jul 25, 2016
Messages
656
Location
The Earth
I like to use System Backup feature in directadmin. After successfully created System Backup, I want to run a custom script.sh.

In the script I need to chown and chmod the backup folder after the system backup has successfully created in order to be able to view in file manager because the backup only can be viewed by root user:

so the script that need to be run after System Backup has run successfully:

#!/bin/sh

#############
USER=myfirelove99

BACKUP_PATH=/home/$USER/system_backups
#############

chown -R $USER:$USER $BACKUP_PATH
chmod -R 755 $BACKUP_PATH

===

Edit: I just notice similar question was asked before 2 years ago (Post #2) but no answer was given here:


Is there a way to do this ?
 
Last edited:
Hello,

If you really use system backups, then you can find the scripts and settings under /usr/local/sysbk/
Some of them might be overwritten by DirectAdmin.
 
Thank you @zEitEr for giving this clue,

I guess I will have to modify this file

/usr/local/sysbk/internals/internals.sysbk

as it has the post backup function postbk() { } which I think is the right place to start.

Thanks a lot.
 
Back
Top