From 2593151ca2c67256442ad25b074504e3ecd3371f Mon Sep 17 00:00:00 2001 From: Lena Date: Wed, 1 Jul 2026 00:00:00 +0000 Subject: app: harden sync execution and persisted state Persist config, key blob, and host pin via AtomicFile so an interrupted write cannot corrupt state. Validate the port, clear the host pin when the remote changes, cap imported key size, time out native helpers, and escalate rsync termination to destroyForcibly. Serialize manual and scheduled syncs behind a mutex. Replace the chained one-time jobs with plain periodic work: it survives reboots without a boot receiver and cannot silently die like a broken chain. Costs the sub-15-minute interval, which photo backup does not need. Document the floor and that syncs run on any unmetered network, not only WiFi. --- README | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'README') diff --git a/README b/README index 7067cac..a77e3df 100644 --- a/README +++ b/README @@ -3,10 +3,10 @@ rsend Push configured phone folders to a home SSH host using real rsync. rsend backs up folders such as DCIM, WhatsApp media, and call recordings to a -remote host over SSH. One-way push only, on WiFi by default, periodic or -manual. Small, boring, self-contained: real rsync and a pure-Go SSH transport, -both built from source and shipped inside the APK. No foreign prebuilt -binaries. +remote host over SSH. One-way push only, on an unmetered network by default, +periodic or manual. Small, boring, self-contained: real rsync and a pure-Go SSH +transport, both built from source and shipped inside the APK. No foreign +prebuilt binaries. What it does @@ -14,7 +14,7 @@ What it does - Pushes one or more local folders to remote paths over rsync-over-SSH. - Incremental: only changed files move; large videos resume (rsync --partial). - Per-folder deletion policy: additive backup (default) or mirror (--delete). -- Runs on unmetered WiFi, periodically (WorkManager) or on demand. +- Runs on an unmetered network, periodically (WorkManager) or on demand. - ed25519 key auth with strict, pinned host-key verification. @@ -55,7 +55,8 @@ Run 3. Set the remote host, user, and port; run Test connection and accept the pinned host-key fingerprint. 4. Add folders, choose each folder's deletion policy, set the schedule. -5. Tap Sync now, or wait for the periodic WiFi sync. +5. Tap Sync now, or wait for the periodic sync. Scheduled intervals have a + 15-minute minimum imposed by WorkManager. For scheduled backup to run reliably, tap Battery and allow rsend to ignore battery optimization. Phones with aggressive power management (Samsung, Xiaomi, @@ -114,9 +115,8 @@ ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on the server. Debug ----- -- The in-app log viewer tails the plain-text rsync log. -- Reproduce a sync from a shell using the same rsync invocation rsend logs at - the top of each run. +- The in-app log viewer displays the plain-text rsync log; tap Refresh to reload. +- The log records the rsync arguments and complete process output for each run. - rsh transport: RSH_KEY, RSH_KNOWN_HOSTS, and RSH_PORT select the key, known_hosts file, and port. Run rsh by hand to isolate SSH from rsync. -- cgit v1.2.3