Skip to content

Commit

Permalink
Add backup and restore feature
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Oct 16, 2023
1 parent 5417c08 commit 068ec90
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 35 deletions.
60 changes: 30 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "domcloud-bridge",
"version": "0.28.0",
"version": "0.29.0",
"description": "Deployment runner for DOM Cloud",
"main": "app.js",
"engines": {
Expand All @@ -17,7 +17,7 @@
"license": "MIT",
"type": "module",
"dependencies": {
"axios": "^1.4.0",
"axios": "^1.5.1",
"cli": "^1.0.1",
"dotenv": "^16.3.1",
"express": "^4.18.2",
Expand All @@ -27,8 +27,8 @@
"shelljs": "^0.8.5"
},
"devDependencies": {
"@types/cli": "^0.11.21",
"@types/express": "^4.17.17",
"@types/shelljs": "^0.8.12"
"@types/cli": "^0.11.22",
"@types/express": "^4.17.19",
"@types/shelljs": "^0.8.13"
}
}
15 changes: 15 additions & 0 deletions src/executor/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,21 @@ export default async function runConfig(config, domain, writer, sandbox = false)
domain,
});
break;
case 'backup':
await writeLog("$> virtualmin backup-domain");
await virtExec("backup-domain", value, {
domain,
'all-features': !value.features,
'as-owner': true,
});
break;
case 'restore':
await writeLog("$> virtualmin restore-domain");
await virtExec("restore-domain", value, {
domain,
'reuid': true,
});
break;
case 'delete':
await writeLog("$> virtualmin delete-domain");
await virtExec("delete-domain", value, {
Expand Down

0 comments on commit 068ec90

Please sign in to comment.