๐ Local sync inspection
Inspect the pCloud Drive sync daemon, diagnose broken sync pairs, and prune orphaned ones.
Every other command in pcloud talks to the pCloud API โ your files as the
server sees them. This one reads the local database that the pCloud Drive
desktop app keeps at ~/.pcloud/data.db, which is where sync pairs live.
That distinction matters because a sync pair can break in ways the API cannot
see. The symptom you actually get is a dialog reading "pCloud doesn't have
permissions to upload this item" against a folder shown as / โ which is
neither a permissions problem nor a folder called /.
๐ Show sync pairs
pcloud syncpCloud Drive running
Database ~/.pcloud/data.db ยท 3.13 MB
Local Remote Files Queue
โ ~/pCloud/Lib /Lib 883 โ
โ ~/pCloud/Share /Share 172 โ
๐ฅ ~/pCloud/Appdata โ orphaned 2066 1
โ ~/pCloud/Home /Home 40 โ
๐ฅ #3 ~/pCloud/Appdata
no remote folder โ pCloud shows this pair as "/"
a second sync pair claims the same local folder
1 queued operation(s) with no destination
โ pcloud sync prune 3Add an id for a single pair, or --json for machine-readable output:
pcloud sync 3
pcloud sync --json๐ What it checks
| Check | Meaning |
|---|---|
orphaned | The pair's remote folder is NULL โ nothing to sync into |
remote-missing | The remote folder id is no longer in the local index |
duplicate | Two pairs claim the same local folder |
local-missing | The local folder no longer exists on disk |
stuck | Queued operations with no destination folder to act on |
orphaned is the interesting one. syncfolder.folderid is declared
ON DELETE SET NULL, so when a remote folder is deleted, SQLite blanks the
reference instead of removing the sync pair. The pair survives as a zombie
pointing at nothing, and every upload it attempts fails.
๐งน Prune an orphaned pair
pcloud sync prune 3 # dry run โ shows what would be deleted
pcloud sync prune 3 --apply # perform itThe dry run is the default. --apply backs up data.db first, and refuses to
run while pCloud Drive is open โ the daemon holds its own copy of the sync set
in memory and would either overwrite the edit or corrupt the write-ahead log.
Quit pCloud Drive, apply, then start it again.
Pruning removes only the local index rows for that pair. It touches no files, on disk or in the cloud.
๐ฌ Debug view
pcloud sync --debugShows daemon state, database size, write-ahead-log status, and row counts per table.
On privacy: the same database holds
setting,cryptofilekeyandcryptofolderkeyโ your auth token and crypto key material. The debug view works from an allowlist of tables it may read, never an exclusion list, so a table pCloud adds in a future release is withheld by default rather than leaked. Withheld tables are named, never read.
๐ฉบ In doctor
pcloud doctor runs these checks as a second section after its credential
report, and prints a one-line verdict per fault class:
Local daemon
7 sync pair(s) ยท pCloud Drive running
โ no local sync faultsThe local half needs no credential, so it still runs when you are logged out.
๐ Read-only, and lock-safe
pCloud Drive holds the database under an exclusive lock while it runs, so
pcloud sync copies the database and its write-ahead log to a temporary
directory and reads the copy. Your live database is only ever copied, never
opened by SQLite โ prune --apply is the sole exception, and it requires the
daemon to be stopped.