Originally reported by @Christian-Gennari in #107
Problem
Backups are created locally in ./backups/ but remain on the same machine. If the machine is lost, the backups are lost too.
Proposed Solution
Add cloud sync support using rclone as the transport layer, supporting 40+ cloud providers (S3, GCS, Azure, Dropbox, Google Drive, etc.).
New files
| File |
Purpose |
Services/Sync/RcloneService.cs |
Check rclone availability, run rclone sync, report results |
Commands/SyncCommand.cs |
Standalone sync command — uploads the backups folder |
Changes to existing files
| File |
Change |
Program.cs |
Add --sync flag to backup command, add sync subcommand |
Commands/BackupCommand.cs |
Accept --sync flag; invoke sync after archive creation if enabled |
Commands/InitCommand.cs |
Scaffold sync.txt alongside existing config files |
sync.txt config
# Cloud sync configuration
# Run `rclone config` to set up a remote first
provider=
path=
CLI usage
# One-time setup
./UbuntuSafeSnap init # creates targets.txt, exclusions.txt, sync.txt
rclone config # configure a remote
# Backup + auto-sync
./UbuntuSafeSnap backup --sync
# Or sync manually anytime
./UbuntuSafeSnap sync
Problem
Backups are created locally in
./backups/but remain on the same machine. If the machine is lost, the backups are lost too.Proposed Solution
Add cloud sync support using rclone as the transport layer, supporting 40+ cloud providers (S3, GCS, Azure, Dropbox, Google Drive, etc.).
New files
Services/Sync/RcloneService.csrclone sync, report resultsCommands/SyncCommand.cssynccommand — uploads the backups folderChanges to existing files
Program.cs--syncflag tobackupcommand, addsyncsubcommandCommands/BackupCommand.cs--syncflag; invoke sync after archive creation if enabledCommands/InitCommand.cssync.txtalongside existing config filessync.txtconfigCLI usage