pub fn setup_backup_locations(config: &Config) -> Result<(), Box<dyn Error>>Expand description
Sets up backup locations based on the server’s role.
This function determines which directories to back up based on the server’s role (web, database, or application server). It then initializes a restic repository and creates a backup script that includes these locations.
§Arguments
config- A reference to theConfigstruct containing the server role
§Returns
Returns Ok(()) if backup locations are set up successfully, or an error if setup fails.