Skip to content

Latest commit

 

History

History
201 lines (146 loc) · 5.83 KB

File metadata and controls

201 lines (146 loc) · 5.83 KB

Cloud backup setup guide (rclone)

SafeKeep can back up to any cloud that rclone supports — Google Drive, Google Cloud Storage, Amazon S3, Backblaze B2, OneDrive, Dropbox, and 40+ more. This guide walks through setup using Google Drive as the worked example, then shows how to adapt it to other providers.

Prefer video/quickstart? The official rclone docs cover every provider in depth.


How it works with SafeKeep

Each run stores a snapshot at:

<remote>/snapshots/<YYYY-MM-DD_HHMMSS>/<label>/...

Only new/changed files are uploaded. Unchanged files are deduplicated against the previous snapshot with rclone --copy-dest (a server-side copy where the provider supports it — no re-upload, no extra bandwidth). verify uses rclone check, restore uses rclone copy back down, and prune uses rclone purge. So cloud destinations behave just like local/NAS ones.


Prerequisites

  • SafeKeep installed (see the main README).
  • An account with your cloud provider.
  • rclone installed (Step 1).

Step 1 — Install rclone

Windows (manual)

  1. Download rclone-vX.Y.Z-windows-amd64.zip from https://rclone.org/downloads/.
  2. Extract rclone.exe to a folder, e.g. C:\Tools\rclone\.
  3. Add that folder to your PATH (Settings → System → About → Advanced system settings → Environment variables → Path → New), or just call it by full path.

Windows (package manager — pick one)

winget install Rclone.Rclone
# or
scoop install rclone
# or
choco install rclone

Verify

rclone version

Step 2 — Configure a remote (Google Drive example)

In a terminal:

rclone config

Answer the prompts like this:

n) New remote
name> gdrive
Storage> drive          # Google Drive (type the word, or its number)
client_id>              # press Enter (leave blank)
client_secret>          # press Enter
scope> 1                # Full access
root_folder_id>         # Enter
service_account_file>   # Enter
Edit advanced config? n
Use auto config? y      # opens your browser

A browser tab opens → sign in to Google → Allow.

⚠️ You'll see "Google hasn't verified this app". That's expected — it's rclone's shared OAuth client. Click Advanced → Go to rclone (unsafe) → approve. For heavy use you can avoid rate limits by registering your own client ID.

Configure as a Shared Drive? n
y) Yes this is OK

Your login token is saved to %APPDATA%\rclone\rclone.conf.


Step 3 — Test the remote

rclone lsd gdrive:

This lists your Drive's top-level folders. If you see them, the remote works.


Step 4 — Add it to SafeKeep

Add a destination to config.toml (or via the GUI's Folders & Settings — but the remote line is easiest to type in the file):

[[destinations]]
name      = "gdrive"
type      = "rclone"
remote    = "gdrive:backups/safekeep"
retention = 30

Keep your NAS/local destinations too if you like — each destination gets its own snapshot every run.

Then run a backup:

python safekeep.py run

or click ▶ Back up now in the GUI. SafeKeep will probe that rclone is installed and the remote is reachable, then upload. The progress bar and log work the same as for local backups.


Step 5 — Verify & restore from cloud

python safekeep.py verify --dest gdrive
python safekeep.py restore --dest gdrive --source my-app --to D:\recovered --yes

verify runs rclone check (hash/size comparison); restore pulls the snapshot back down with rclone copy.


Other providers

The flow is identical — only the Storage> choice and credentials differ. A few common ones:

Provider Storage> Auth Example remote
Google Drive drive browser OAuth gdrive:backups/safekeep
Google Cloud Storage google cloud storage service-account JSON gcs:my-bucket/safekeep
Amazon S3 s3 access key + secret s3:my-bucket/safekeep
Backblaze B2 b2 keyID + key b2:my-bucket/safekeep
OneDrive onedrive browser OAuth onedrive:backups/safekeep
Dropbox dropbox browser OAuth dropbox:backups/safekeep

Browse the full list with rclone config → at the Storage> prompt type ?, or see https://rclone.org/overview/.


Storage & cost considerations

  • The first snapshot is full-size; every run after uploads only deltas.
  • Google Drive free tier = 15 GB shared with Gmail/Photos. If your data is bigger, exclude large folders, lower retention, or upgrade (Google One).
  • Object-storage providers (S3/B2/GCS) bill per GB-stored + per-request — SafeKeep's dedup and bounded retention keep it cheap. Set a sensible retention per destination.

Troubleshooting

  • rclone is not installed or not on PATH — SafeKeep can't find rclone. Reinstall or fix your PATH (rclone version must work in a new terminal).
  • rclone remote '...' not reachable — run rclone lsd <remote>: yourself; rclone prints the real error (auth, config, network). Re-run rclone config to fix.
  • Token expired / re-authoriserclone confige) Edit existing remote → re-run auto-config.
  • Google Drive 403 userRateLimitExceeded — rclone's shared client ID is heavily used. Make your own client ID.
  • First backup is slow — expected (it's the only full upload). Later runs are incremental.

Security

  • Credentials live in %APPDATA%\rclone\rclone.confkeep that file private; anyone with it can access your cloud.
  • SafeKeep itself never logs credentials and config.toml/logs/ are gitignored.