gilesknap / gphotos-sync

Google Photos and Albums backup with Google Photos Library API
Apache License 2.0
1.97k stars 163 forks source link

Unable to start fresh local install - `Database is locked` #373

Closed taquitos closed 2 years ago

taquitos commented 2 years ago

Fresh install on M1 macmini running 12.4 (21F79) python3 --version : Python 3.8.9

Following instructions: https://gilesknap.github.io/gphotos-sync/main/tutorials/installation.html#local-installation

Deleting the lock file doesn't fix it. Attempting to sync to a mounted smb share, 3.0.3 release and main branch get the same result.

Results of gphotos-sync /Volumes/My\ Book/Pictures\ Backup/Google\ Photos\ Backup

07-07 16:37:11 gphotos_sync.Main WARNING  gphotos-sync 3.5.dev10+g2f6bcbb 2022-07-07 16:37:11.907150
07-07 16:37:11 gphotos_sync.Utils DEBUG    MINIMUM_DATE = 1800-01-01 00:00:00
07-07 16:37:11 gphotos_sync.Checks INFO     Target filesystem /volumes/my book/pictures backup/google photos backup is smbfs
07-07 16:37:11 gphotos_sync.Checks DEBUG    Checking if is filesystem supports symbolic links...
07-07 16:37:11 gphotos_sync.Checks DEBUG    attempting to symlink /Volumes/My Book/Pictures Backup/Google Photos Backup/test_src_754432571 to /Volumes/My Book/Pictures Backup/Google Photos Backup/test_dst_3571408885
07-07 16:37:11 gphotos_sync.Checks DEBUG    Checking if File system supports unicode filenames...
07-07 16:37:12 gphotos_sync.Checks INFO     Filesystem supports Unicode filenames
07-07 16:37:12 gphotos_sync.Checks DEBUG    Checking if File system is case insensitive...
07-07 16:37:12 gphotos_sync.Checks INFO     Case insensitive file system found
07-07 16:37:12 gphotos_sync.Checks INFO     Max Path Length: 1024
07-07 16:37:12 gphotos_sync.Checks INFO     Max filename length: 255
07-07 16:37:12 gphotos_sync.Main WARNING  EXITING: database is locked
taquitos commented 2 years ago

I just used an external apfs drive and it started up correctly. My guess is network share-related issues.

gilesknap commented 2 years ago

@taquitos not all filesystems support lock semantics. The workaround for this is the to keep the database on your local filesystem separately. This is achieved with the --db-path option

taquitos commented 2 years ago

OHhh nice, thank you!