Documentation
    Preparing search index...
    backupJs: {
        auto_backup_now: () => Promise<void>;
        backup_file_name: () => string;
        backup_to_stream: <T>(
            consume: (body: Readable) => Promise<T>,
        ) => Promise<T>;
        create_backup: (fnm?: string) => Promise<string>;
        create_csv_from_rows: (rows: Row[], fnm: string) => Promise<void>;
        create_pack_json: (
            withEventLog?: boolean,
            forSnapshot?: boolean,
        ) => Promise<object>;
        extract: (fnm: string, dir: string, password?: string) => Promise<void>;
        restore: (
            fnm: string,
            loadAndSaveNewPlugin: (plugin: Plugin) => void,
            restore_first_user?: boolean,
            password?: string,
            onLog?: (msg: string) => void,
        ) => Promise<string | void>;
    }

    Type Declaration

    • auto_backup_now: () => Promise<void>
    • backup_file_name: () => string

      The name a backup taken now gets, e.g. sc-backup-Saltcorn-2026-08-14-09-15.zip

    • backup_to_stream: <T>(consume: (body: Readable) => Promise<T>) => Promise<T>

      Build a backup and hand it to consume as a stream, for destinations written over the network (S3, SFTP) or straight to a browser, where no local copy is wanted. The archive is produced as the consumer reads it, so only a few buffers of it exist at a time.

    • create_backup: (fnm?: string) => Promise<string>

      Create backup

    • create_csv_from_rows: (rows: Row[], fnm: string) => Promise<void>
    • create_pack_json: (withEventLog?: boolean, forSnapshot?: boolean) => Promise<object>
    • Functionextract: (fnm: string, dir: string, password?: string) => Promise<void>

      Extract a zip file into a directory

    • restore: (
          fnm: string,
          loadAndSaveNewPlugin: (plugin: Plugin) => void,
          restore_first_user?: boolean,
          password?: string,
          onLog?: (msg: string) => void,
      ) => Promise<string | void>

      Restore from backup