first commit

This commit is contained in:
2026-08-08 21:14:10 -05:00
commit e1600da8b1
55 changed files with 2687 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import { storeJson } from './fileModels/store.json'
import { sdk } from './sdk'
import { databaseName, databaseUser } from './utils'
export const { createBackup, restoreInit } = sdk.setupBackups(async () =>
sdk.Backups.withPgDump({
imageId: 'postgres',
dbVolume: 'postgres',
mountpoint: '/var/lib/postgresql/data',
pgdataPath: '',
database: databaseName,
user: databaseUser,
password: async () => {
const password = await storeJson
.read(value => value.databasePassword)
.once()
if (!password) throw new Error('Database password is not initialized')
return password
},
})
.addVolume('config')
.addVolume('storage'),
)