defaults: retention: keep_latest: 10 keep_hourly: 24 keep_daily: 30 keep_weekly: 8 keep_monthly: 12 keep_yearly: 3 common: sftp_strategy: &sftp_strategy type: "kopia" provider: "sftp" destination: username: "user" host: "example.com" path: "/backup/path/" ssh_key: "/home/user/.ssh/backup_key" # /!\ Key should not have passphrase services: service_name: source: host: "local" path: "/path/to/service" hooks: before_hook: "docker compose down" after_hook: "docker compose up -d" backup_configs: 1: backup_strategy: type: "kopia" provider: "local" destination: path: "/local/backup/path" 2: backup_strategy: type: "kopia" provider: "b2" # Credentials are in .env 3: backup_strategy: <<: *sftp_strategy # This uses the common sftp strategy defined above # Example of another service another_service: source: host: "local" path: "/path/to/another/service" hooks: before_hook: "systemctl stop service-name" after_hook: "systemctl start service-name" backup_configs: 1: backup_strategy: type: "kopia" provider: "local" destination: path: "/local/backup/path"