feat(fuse,core,cli,gui): move another computer's backup to this one

A user switching from a Windows PC to Linux had two half answers:
adopting the old device makes this machine back up as it, and restoring
its folders keeps them in the old device's tree. Neither puts the data
under this machine's own device.

Device roots are separate shares on the main volume, so each top-level
folder of the other device can move under this device's root in one
server-side move. Nothing is uploaded again, and the other device stays
registered, without those folders.

- core: `Request::MigrateDevice { uid }` and
  `Db::sync_folder_set_share`
- fuse: `Core::migrate_device` moves every folder, suffixes a name
  already taken here with the other device's name, keeps going past a
  failed folder, and re-points sync folders that already tracked a
  moved folder at the new share
- cli: `pdfs devices migrate UID [--yes]` confirms, moves, then runs
  the ordinary restore picker
- gui: "Move to This Computer…" on another computer's row, followed by
  the restore picker
- i18n: translate the new strings in every catalog
- docs: CLI.md, USER_GUIDE.md, RECOVERY.md, ARCHITECTURE.md, changelog
This commit is contained in:
nvrl committed 2026-10-08 13:34:28 +02:00
1 parent 8d0351124c
commit 3e3dd7db41
21 files changed
+1349 -694

No files matched your search

+6
View File
@@ -377,6 +377,12 @@ Restore lists the device's folders, proposes a local path from the profile, and
adds a synced folder bound to the remote uid. The download is an ordinary pass against an empty
baseline. The user side is in [RECOVERY.md](RECOVERY.md).
`Core::migrate_device` moves another device's top-level folders under this machine's device root.
Device roots are separate shares on the main volume, so each folder is one server-side move that
keeps its uid. A name already taken here gets the other device's name as a suffix. A synced folder
that already tracked one of them keeps its `remote_uid` and only has its `remote_share_id`
re-pointed. The moved folders are then offered by the ordinary restore.
---
## 8. Control protocol
+7
View File
@@ -11,6 +11,13 @@ scratch (user data in `staging/` and `recovery/` is never touched by this).
## [Unreleased]
### Added
- **Move another computer's backup to this one.** **Move to This Computer…** on the Computers page,
or `pdfs devices migrate UID`, moves every folder another computer backs up, for example an old
Windows PC, into this computer's backup on Proton Drive. Then it offers them for syncing here. The
folders move on Proton Drive itself, so nothing is uploaded again. The other computer stays in the
account, without those folders.
## [3.1.2] — 2026-10-08
Schema: **42**, unchanged.
+1
View File
@@ -103,6 +103,7 @@ commands are for scripts and for cases where the mount is not available.
| `pdfs devices rename UID NAME` | Rename a computer. |
| `pdfs devices rm UID` | Remove a computer and its backup from the account. |
| `pdfs devices adopt UID` | Make this machine continue another computer's backup, for example after a reinstall. `--clear` returns to matching by hostname. |
| `pdfs devices migrate UID [--yes]` | Move another computer's folders into this computer's backup, then restore them here like `pdfs sync restore`. The other computer stays registered, without those folders. `--yes` skips the confirmation and accepts every proposed path. See [RECOVERY.md](RECOVERY.md). |
## Trash
+23
View File
@@ -133,6 +133,29 @@ pdfs sync restore --device UID
The folders stay part of the other computer's backup and sync in both directions. This machine
does not take over that computer's backup.
### Moving another computer's backup here
To switch computers for good, for example from a Windows PC to this Linux machine, move the old
computer's folders into this computer's backup instead. Use **Move to This Computer…** on that
computer's row, or:
```bash
pdfs devices list # find the old computer's UID
pdfs devices migrate UID
```
Each folder moves on Proton Drive itself, so nothing is uploaded again and no storage is used
twice. A folder whose name this computer already uses gets the old computer's name added, for
example `Documents (DESKTOP-1)`. The restore picker then opens, as in
[Step 3](#step-3-restore-the-folders), so you choose where each folder goes here.
The old computer stays in your account, without those folders. Unlike
[adoption](#step-2-continue-the-old-computers-backup), this machine keeps its own name and backup.
> [!WARNING]
> Stop Proton Drive on the old computer first. A client still running there sees its folders
> disappear, and may upload them again as new.
## 3. How the restore works
This section is for the curious and for anyone debugging a restore.
+3
View File
@@ -278,6 +278,9 @@ Proton Drive keeps earlier versions of every file. **Details → Versions…** i
**Restore to This Computer…** downloads its folders here.
- **Continue This Backup Here…** makes this computer take over another computer's backup, for
example after reinstalling or replacing a machine. See [RECOVERY.md](RECOVERY.md).
- **Move to This Computer…** moves another computer's folders into this computer's backup, for
example when you switch from Windows to Linux, and then offers them for syncing here. The other
computer stays in the list, without those folders.
## Search launcher