/**
 * Scheduled database backups powered by `ts-backups`, synced to object storage.
 *
 * On the box we generate a `ts-backups` config from the ts-cloud database
 * config, install the tool (Bun + `ts-backups`), and add a cron job that runs
 * the backup and syncs the output directory to an S3-compatible bucket
 * (AWS S3 or Hetzner object storage). `ts-backups` handles dump + local
 * retention; ts-cloud handles the off-box copy.
 */
import type { ComputeBackupConfig, DatabaseConfig } from '@ts-cloud/core';
/** Where backups are written on the box before being synced off. */
export declare const BACKUP_OUTPUT_DIR = "/var/backups/ts-cloud";
/** Generated ts-backups config location. */
export declare const BACKUP_CONFIG_PATH = "/etc/ts-cloud/backups.config.ts";
/** Cron file + runner paths. */
export declare const BACKUP_CRON_PATH = "/etc/cron.d/ts-cloud-backups";
export declare const BACKUP_RUNNER_PATH = "/usr/local/bin/ts-cloud-backup.sh";
/** Generate the `ts-backups` config file content from the database config. */
export declare function buildBackupsConfigTs(database: DatabaseConfig | undefined, backups: ComputeBackupConfig): string;
export interface BackupProvisionOptions {
    database?: DatabaseConfig;
    backups: ComputeBackupConfig;
}
/**
 * Build the commands that install + schedule backups. Returns `[]` when
 * disabled. Assumes the box can install Bun (to run `ts-backups`).
 */
export declare function buildBackupProvisionScript(options: BackupProvisionOptions): string[];
export interface BackupRestoreOptions {
    /** Specific dump file on the box (absolute path). Default: newest matching dump. */
    from?: string;
}
/**
 * Build the commands that restore a database from a ts-backups dump on the box.
 * With no `from`, the newest dump under {@link BACKUP_OUTPUT_DIR} matching the
 * database name is used. Handles plain `.sql` and gzipped `.sql.gz`. MySQL/
 * MariaDB restore over the root unix socket; Postgres over the local unix
 * socket for a co-located engine, or TCP with credentials for an external
 * host (see {@link pgAdminCommand}).
 * Returns `[]` when the database has no name.
 */
export declare function buildBackupRestoreScript(database: DatabaseConfig | undefined, options?: BackupRestoreOptions): string[];
