System Backup post script (all_backup_post.sh) ?

maxi32

Verified User
Joined
Jul 25, 2016
Messages
52
Location
Malaysia
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:

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
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.
 

maxi32

Verified User
Joined
Jul 25, 2016
Messages
52
Location
Malaysia
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.
 
Top