Skip to content

Instantly share code, notes, and snippets.

@joeperpetua
Created June 20, 2024 13:51
Show Gist options
  • Save joeperpetua/715892d2fee612277209e5973b52b18b to your computer and use it in GitHub Desktop.
Save joeperpetua/715892d2fee612277209e5973b52b18b to your computer and use it in GitHub Desktop.
Export unsynced files from Synology Drive Client to CSV

You can access the logs directly from the Drive Client DB files.

To do so, first install sqlite3 in your Windows machine:

winget install SQLite.SQLite

Then, run the following command:

Bash CLI:

sqlite3 -csv -header /c/Users/USERNAME/AppData/Local/SynologyDrive/data/db/history.sqlite "SELECT datetime(update_time, 'unixepoch', 'localtime'), path, not_synced_reason FROM history_table WHERE is_not_synced=1" > /c/Users/USERNAME/Downloads/unsynced_logs.csv

PowerShell:

sqlite3 -csv -header C:\Users\USERNAME\AppData\Local\SynologyDrive\data\db\history.sqlite "SELECT datetime(update_time, 'unixepoch', 'localtime'), path, not_synced_reason FROM history_table WHERE is_not_synced=1" > C:\Users\USERNAME\Downloads\unsynced_logs.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment