liarsdice::database::BackupManager class

Database backup and recovery manager using boost::filesystem.

Constructors, destructors, conversion operators

BackupManager(DatabaseManager& db, const boost::filesystem::path& backup_dir) explicit

Public functions

void set_retention_policy(const RetentionPolicy& policy)
Set retention policy for backups.
auto create_backup(const std::string& backup_name = "") -> DatabaseResult<BackupInfo>
Create a manual backup with optional name.
auto create_scheduled_backup(const std::string& backup_type) -> DatabaseResult<BackupInfo>
Create scheduled backup (daily/weekly/monthly/yearly)
auto restore_from_backup(const boost::filesystem::path& backup_file) -> DatabaseResult<void>
Restore database from backup file.
auto list_backups() -> DatabaseResult<std::vector<BackupInfo>>
List all available backups.
auto apply_retention_policy() -> DatabaseResult<void>
Apply retention policy (cleanup old backups)
auto verify_backup(const boost::filesystem::path& backup_file) -> DatabaseResult<bool>
Verify backup integrity using checksums.
auto get_storage_statistics() -> DatabaseResult<std::map<std::string, size_t>>
Get backup directory usage statistics.
auto compress_backup(const boost::filesystem::path& backup_file) -> DatabaseResult<boost::filesystem::path>
Compress existing backup file.
auto decompress_backup(const boost::filesystem::path& compressed_file) -> DatabaseResult<boost::filesystem::path>
Decompress backup file.
auto create_sql_dump(const std::string& dump_name = "") -> DatabaseResult<BackupInfo>
Create backup with custom SQL dump.
auto import_sql_dump(const boost::filesystem::path& dump_file) -> DatabaseResult<void>
Import from SQL dump file.
auto schedule_automatic_backups(bool enable = true) -> DatabaseResult<void>
Schedule automatic backups (sets up recurring backup creation)