Compare commits
No commits in common. "924c48a8b1d129ceb0319b1b4a8a2c892bdfae17" and "2b689152093f41ecf5230319ee70324a3d9d3e37" have entirely different histories.
924c48a8b1
...
2b68915209
14
manifest.jps
14
manifest.jps
|
@ -3,7 +3,7 @@ type: update
|
||||||
name: MightyBox WordPress Backup/Restore Addon
|
name: MightyBox WordPress Backup/Restore Addon
|
||||||
id: mb-backup-manager
|
id: mb-backup-manager
|
||||||
description: Custom Backup and Restore Addon for WordPress using Restic. Supports backing up databases, core files, media files, and full backups with scheduling and retention policies.
|
description: Custom Backup and Restore Addon for WordPress using Restic. Supports backing up databases, core files, media files, and full backups with scheduling and retention policies.
|
||||||
baseUrl: https://deploy.mightybox.io/addons/mb-backup-manager/src/branch/main
|
baseUrl: https://deploy-proxy.mightybox.io/addons/mb-backup-manager
|
||||||
|
|
||||||
targetNodes:
|
targetNodes:
|
||||||
nodeGroup: cp
|
nodeGroup: cp
|
||||||
|
@ -56,8 +56,8 @@ settings:
|
||||||
onBeforeInit: scripts/backupOnBeforeInit.js
|
onBeforeInit: scripts/backupOnBeforeInit.js
|
||||||
|
|
||||||
buttons:
|
buttons:
|
||||||
- caption: Backup All Now
|
- caption: Backup Now
|
||||||
action: backupallnow
|
action: backup
|
||||||
loadingText: Backing up...
|
loadingText: Backing up...
|
||||||
confirmText: Do you want to initiate the backup process?
|
confirmText: Do you want to initiate the backup process?
|
||||||
successText: The backup process has been finished successfully.
|
successText: The backup process has been finished successfully.
|
||||||
|
@ -166,7 +166,7 @@ actions:
|
||||||
|
|
||||||
installScript:
|
installScript:
|
||||||
- removeScript
|
- removeScript
|
||||||
- getStorageNode
|
- getStorageCtid
|
||||||
- script: ${baseUrl}/scripts/create-backup-main-script.js?_r=${fn.random}
|
- script: ${baseUrl}/scripts/create-backup-main-script.js?_r=${fn.random}
|
||||||
params:
|
params:
|
||||||
scriptName: ${env.envName}-${globals.scriptSufix}
|
scriptName: ${env.envName}-${globals.scriptSufix}
|
||||||
|
@ -196,7 +196,7 @@ actions:
|
||||||
}
|
}
|
||||||
return { result: 0 };
|
return { result: 0 };
|
||||||
|
|
||||||
backupallnow:
|
backup:
|
||||||
- callScript: backup
|
- callScript: backup
|
||||||
|
|
||||||
restore:
|
restore:
|
||||||
|
@ -209,8 +209,8 @@ actions:
|
||||||
configure:
|
configure:
|
||||||
- setSchedule
|
- setSchedule
|
||||||
|
|
||||||
getStorageNode:
|
getStorageCtid:
|
||||||
- script: scripts/getStorageNode.js
|
- script: scripts/getStorageCtid.js
|
||||||
|
|
||||||
convert:
|
convert:
|
||||||
- script: |
|
- script: |
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
var storageEnv = '${settings.storageName}'
|
||||||
|
var storageEnvShortName = storageEnv.split(".")[0]
|
||||||
|
var resp = api.environment.control.GetEnvInfo(storageEnvShortName, session)
|
||||||
|
if (resp.result != 0) return resp
|
||||||
|
for (var i = 0; resp.nodes; i++) {
|
||||||
|
var node = resp.nodes[i]
|
||||||
|
if (node.nodeGroup == 'storage' && node.ismaster) {
|
||||||
|
return { result: 0, storageCtid : node.id, storageEnvShortName : storageEnvShortName};
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue