UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 809 B
import{a as resolveSqliteDatabaseFilePaths}from"./sqlite-files-731tEtYd.mjs";import{i as withDoctorSqliteMaintenanceLock}from"./doctor-sqlite-maintenance-lock-De_t-lkq.mjs";import{o as restoreScopedMigrationSnapshot}from"./sqlite-migration-scoped-snapshot-8GlRXeDb.mjs";import path from"node:path"; //!src/commands/doctor-migration-backup-restore.ts async function restoreDoctorMigrationBackup(e){const t=path.resolve(e.sourcePath);const n=path.resolve(e.backupPath);return withDoctorSqliteMaintenanceLock({env:e.env,operation:`scoped migration backup restore`,protectedPaths:[...resolveSqliteDatabaseFilePaths(t),n],run:e=>{restoreScopedMigrationSnapshot({sourcePath:t,backupPath:n,assertCurrent:()=>e.assertCurrent()});return{restored:true,sourcePath:t,backupPath:n}}})}export{restoreDoctorMigrationBackup};