mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Fix/backups (#2659)
* fix master build (#2639) * feat: Change ts to use rsync Chore: Update the ts to use types over interface * feat: Get the rust and the js to do a backup * Wip: Got the backup working? * fix permissions * remove trixie list * update tokio to fix timer bug * fix error handling on backup * wip * remove idmap * run restore before init, and init with own version on restore --------- Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Backups } from "./Backups"
|
||||
import { SDKManifest } from "../manifest/ManifestTypes"
|
||||
import { ExpectedExports } from "../types"
|
||||
import { ExpectedExports, PathMaker } from "../types"
|
||||
import { _ } from "../util"
|
||||
|
||||
export type SetupBackupsParams<M extends SDKManifest> = Array<
|
||||
@@ -27,14 +27,14 @@ export function setupBackups<M extends SDKManifest>(
|
||||
get createBackup() {
|
||||
return (async (options) => {
|
||||
for (const backup of backups) {
|
||||
await backup.build().createBackup(options)
|
||||
await backup.build(options.pathMaker).createBackup(options)
|
||||
}
|
||||
}) as ExpectedExports.createBackup
|
||||
},
|
||||
get restoreBackup() {
|
||||
return (async (options) => {
|
||||
for (const backup of backups) {
|
||||
await backup.build().restoreBackup(options)
|
||||
await backup.build(options.pathMaker).restoreBackup(options)
|
||||
}
|
||||
}) as ExpectedExports.restoreBackup
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user