Function server_forge::backup::setup_backup_system
source · pub fn setup_backup_system(
config: &Config,
rollback: &RollbackManager,
) -> Result<(), Box<dyn Error>>
Expand description
Sets up the backup system based on the provided configuration.
This function orchestrates the entire backup setup process, including:
- Installing necessary backup tools
- Configuring the backup schedule
- Setting up backup locations
It creates a snapshot before starting the setup process for potential rollback.
§Arguments
config
- A reference to theConfig
struct containing backup configurationrollback
- A reference to theRollbackManager
for creating snapshots
§Returns
Returns Ok(())
if the backup system is set up successfully, or an error if setup fails.