Submitted by markhard on Tue, 07/29/2014 - 04:36
on Cloudmin Configuration > Post-modification scripts there is an option of Command to run before deleting a system i want to use this to create backup before deleting a virtual system, i'm thinking of calling the command line API but how do i supply the --host flags with current virtual system host name?
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Tue, 07/29/2014 - 13:01 Comment #1
You can use $SERVERMANAGER_HOST to get the hostname. The full pre-change script should be like :
if [ "$SERVERMANAGER_ACTION" = "DELETE" ]; then
cloudmin backup-systems --host $SERVERMANAGER_HOST --dest /backup
fi
Submitted by markhard on Wed, 07/30/2014 - 18:30 Comment #2
other than $SERVERMANAGER_ACTION and $SERVERMANAGER_HOST what variables available for scripting? i can't find it in documentation.
Submitted by JamieCameron on Wed, 07/30/2014 - 18:59 Comment #3
Basically everything in the file
/etc/webmin/servers/XXX.serv
, where XXX is the unique ID for the VM.Submitted by Issues on Wed, 08/13/2014 - 19:01 Comment #4
Automatically closed -- issue fixed for 2 weeks with no activity.