diff --git a/README.md b/README.md index 69c8df2..7de89ea 100644 --- a/README.md +++ b/README.md @@ -53,13 +53,20 @@ so they read the same whoever sends them to you. - **Not notarised.** Releases are signed with a self-signed certificate, not with an Apple Developer ID. The Homebrew cask clears the quarantine flag; a DMG downloaded by hand gets Gatekeeper's "unidentified developer" warning. -- **No client-side encryption.** The backup's bands are stored on Google - Drive as they are, unencrypted by CloudMachine: anyone who can read the - Google account (and Google itself) can read the backup, which is a copy of - the whole Mac. Do not use it for data you may not hand to Google, such as - a company's or clients' data on a private Google account. Time Machine's - own "Encrypt backups" is not supported yet: `vm-prepare-bundle` refuses an - encrypted image. +- **Client-side encryption is opt-in, from Terminal only.** By default the + backup's bands are stored on Google Drive as they are, unencrypted by + CloudMachine: anyone who can read the Google account (and Google itself) + can read the backup, which is a copy of the whole Mac. Until encryption is + switched on, do not use it for data you may not hand to Google, such as a + company's or clients' data on a private Google account. + `cloudmachine-agent vm-encrypt` moves an existing backup under rclone + `crypt` encryption, into `gdrive:CloudMachine/-crypt`, without a + new full backup: `setup`, `copy`, `switch`, then `delete-plain` + (`rollback` undoes `switch` until `delete-plain`). The password and salt + are kept in the macOS Keychain; keep both outside the Mac too, without + them the encrypted backup cannot be read. The app window does not offer + this yet. Time Machine's own "Encrypt backups" is not supported: + `vm-prepare-bundle` refuses an encrypted image. - **A full Google Drive is not named as such.** It shows up as an upload that hangs and a growing backlog, with the guard pausing Time Machine. Google's daily upload limit (750 GB) is named: `cloudmachine-agent diff --git a/config/machines.example.json b/config/machines.example.json index c43be41..28c7694 100644 --- a/config/machines.example.json +++ b/config/machines.example.json @@ -1,10 +1,10 @@ { - "_comment": "Copy this file to machines.json and adjust it. The sum of limit_gb for both Macs should stay below the real capacity of the Google drive (leave a safety margin, e.g. 10-15%, for rclone/Google overhead and accidental growth between watchdog checks).", + "_comment": "The shape of ~/Library/Application Support/CloudMachine/machines.json, which CloudMachine creates itself. Only limit_gb is used: set it with `cloudmachine-agent set-limit --gb N` or the Space limit card, which store it under this Mac's Drive folder name. Keep the sum of limit_gb of all Macs on one Google account below its real capacity, with a safety margin.", "drive_total_gb": 5000, "safety_margin_percent": 10, "remote_name": "gdrive-cloudmachine", "remote_root_folder": "CloudMachine", - "_bwlimit_comment": "Upload speed limit in Mbps (megabits/s, as internet providers quote it) - this setting is per-Mac, so each machine can have a different value in its local machines.json. 0 = no limit.", + "_bwlimit_comment": "Read but not used: the upload from the machine has no rclone --bwlimit; incoming SMB is shaped inside the machine (vm/smb-throttle.sh). drive_total_gb, safety_margin_percent, remote_name and remote_root_folder are likewise read and not used (the Drive remote and root folder are fixed in code: gdrive:CloudMachine).", "bwlimit_mbps": 0, "machines": { "macbook-pro": { diff --git a/mac-app/Sources/CloudMachineCore/MachinesConfig.swift b/mac-app/Sources/CloudMachineCore/MachinesConfig.swift index 764a452..f1341a6 100644 --- a/mac-app/Sources/CloudMachineCore/MachinesConfig.swift +++ b/mac-app/Sources/CloudMachineCore/MachinesConfig.swift @@ -18,11 +18,11 @@ public struct MachinesConfig: Codable, Equatable { public var safetyMarginPercent: Int public var remoteName: String public var remoteRootFolder: String - /// rclone upload speed limit (Mbps - megabits/s, as internet providers - /// quote it), passed as `--bwlimit` (which expects megabytes/s - conversion - /// in `CloudArchiveService.bwLimitArgs`). `0` = no limit. Used by the cloud - /// archiving layer (`CloudArchiveService`) on every `rclone copy` of a - /// finished backup to Google Drive. + /// Upload speed limit in Mbps (megabits/s), `0` = no limit. Read and kept + /// for compatibility, but used nowhere: the cloud archiving layer + /// (`CloudArchiveService`) that passed it as `--bwlimit` is gone, and the + /// machine's rclone runs without `--bwlimit` (incoming SMB is shaped by + /// `vm/smb-throttle.sh` instead). public var bwLimitMbps: Int public var machines: [MachineEntry] diff --git a/packaging/README.md b/packaging/README.md index 67ec213..a7297a3 100644 --- a/packaging/README.md +++ b/packaging/README.md @@ -20,8 +20,9 @@ the workaround for a failed push (see "The tap repository" below). Nothing to do by hand: **every merge to `main` that changes the app is released.** "Changes the app" means `mac-app/Sources`, `mac-app/Resources`, -`Package.swift`/`Package.resolved`, `mac-app/VERSION`, `launchd/`, `config/` -or the cask template; docs-only and test-only merges are not released. +`Package.swift`/`Package.resolved`, `mac-app/VERSION`, `launchd/`, `vm/` +(the machine template ships inside the app), `config/` or the cask template; +other docs-only and test-only merges are not released. The version number: @@ -40,8 +41,9 @@ as a GitHub Release tagged on the merge commit, and updates the cask. Users get it with `brew upgrade`. **Run workflow** on the Actions tab releases the current `main` the same way, -for example after a failed run. A `vX.Y.Z` tag pushed by hand releases exactly -that version. +for example after a failed run; started on any other branch it is a dry run. +A `vX.Y.Z` tag pushed by hand releases exactly that version, but only when the +tagged commit is on `main` - a tag on any other commit fails. A pull request that touches the build or the cask runs the same pipeline dry: ad-hoc signature, no release, no tap push; the DMG and the rendered cask are