Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Syncing to SMB share fails #227

Closed
wally007 opened this issue Apr 26, 2020 · 4 comments
Closed

Syncing to SMB share fails #227

wally007 opened this issue Apr 26, 2020 · 4 comments
Assignees

Comments

@wally007
Copy link

wally007 commented Apr 26, 2020

Describe the bug
CentOS 7.6 - running as root - using SNAP install method (pipenv method fails to install on CentOS 7.6)
Trying initial sync to SMB share fails (server is Windows 10 Pro)
Sync to local storage works

SMB permissions are correct as gphotos-sync creates .db, log, sqlite and lock file in destination (on the SMB share)

[root@pihole ~]# ls -la  /mnt/C_W2012/Photos/
total 16
drwxr-xr-x 2 root root 4096 Apr 26 10:46 .
drwxr-xr-x 2 root root 8192 Apr 25 19:35 ..
-rwxr-xr-x 1 root root    0 Apr 26 10:46 gphotos.lock
-rwxr-xr-x 1 root root 1905 Apr 26 10:46 gphotos.log
-rwxr-xr-x 1 root root    0 Apr 25 19:37 gphotos.sqlite
-rwxr-xr-x 1 root root    0 Apr 26 10:46 gphotos.trace
[root@pihole ~]#

Here is the console output (tried with and without --ntfs flag -result is the same):

[root@pihole ~]# gphotos-sync --ntfs /mnt/C_W2012/Photos/
04-26 10:46:26 WARNING  gphotos-sync 2.14.0 2020-04-26 10:46:26.667801
04-26 10:46:26 ERROR    Symbolic links not supported
04-26 10:46:26 ERROR    Albums are not going to be synced - requires symlinks
04-26 10:46:26 ERROR
Process failed.
Traceback (most recent call last):
  File "/snap/gphotos-sync/186/lib/python3.6/site-packages/gphotos/Main.py", line 417, in main
    self.setup(args, db_path)
  File "/snap/gphotos-sync/186/lib/python3.6/site-packages/gphotos/Main.py", line 263, in setup
    self.data_store = LocalData(db_path, args.flush_index)
  File "/snap/gphotos-sync/186/lib/python3.6/site-packages/gphotos/LocalData.py", line 55, in __init__
    self.check_schema_version()
  File "/snap/gphotos-sync/186/lib/python3.6/site-packages/gphotos/LocalData.py", line 80, in check_schema_version
    self.cur.execute(query)
sqlite3.OperationalError: no such table: Globals
04-26 10:46:26 WARNING  Done.
[root@pihole ~]# 

here is the log file:

[root@pihole ~]# cat  /mnt/C_W2012/Photos/gphotos.log
04-26 10:46:26 gphotos.Main WARNING  gphotos-sync 2.14.0 2020-04-26 10:46:26.667801
04-26 10:46:26 gphotos.Utils DEBUG    MINIMUM_DATE = 1800-01-01 00:00:00
04-26 10:46:26 gphotos.Checks DEBUG    Checking if is filesystem supports symbolic links...
04-26 10:46:26 gphotos.Checks DEBUG    attempting to symlink /mnt/C_W2012/Photos/test_src_263211308 to /mnt/C_W2012/Photos/test_dst_3102892891
04-26 10:46:26 gphotos.Checks ERROR    Symbolic links not supported
04-26 10:46:26 gphotos.Checks ERROR    Albums are not going to be synced - requires symlinks
04-26 10:46:26 gphotos.Checks DEBUG    Checking if File system supports unicode filenames...
04-26 10:46:26 gphotos.Checks INFO     Filesystem does not support Unicode filenames
04-26 10:46:26 gphotos.Checks DEBUG    Checking if File system is case insensitive...
04-26 10:46:26 gphotos.Checks INFO     Case insensitive file system found
04-26 10:46:26 gphotos.Checks INFO     Max Path Length: 4096
04-26 10:46:26 gphotos.Checks INFO     Max filename length: 4096
04-26 10:46:26 gphotos.Main INFO     version: 2.14.0, database schema version 5.7
04-26 10:46:26 gphotos.Main ERROR
Process failed.
Traceback (most recent call last):
  File "/snap/gphotos-sync/186/lib/python3.6/site-packages/gphotos/Main.py", line 417, in main
    self.setup(args, db_path)
  File "/snap/gphotos-sync/186/lib/python3.6/site-packages/gphotos/Main.py", line 263, in setup
    self.data_store = LocalData(db_path, args.flush_index)
  File "/snap/gphotos-sync/186/lib/python3.6/site-packages/gphotos/LocalData.py", line 55, in __init__
    self.check_schema_version()
  File "/snap/gphotos-sync/186/lib/python3.6/site-packages/gphotos/LocalData.py", line 80, in check_schema_version
    self.cur.execute(query)
sqlite3.OperationalError: no such table: Globals
04-26 10:46:26 gphotos.Main WARNING  Done.
04-26 10:46:26 gphotos.Main INFO     Elapsed time = 0:00:00.055071
[root@pihole ~]#

I'm aware that symlinks are not supported (i dont have any albums anyway) and will only sync once a month FULL Google Photos library (flush-index) - in order to always get latest version (edited) files)

@gilesknap
Copy link
Owner

gilesknap commented Apr 26, 2020 via email

@gilesknap
Copy link
Owner

In Bug #221 the user got the same error as you have and it was fixed by moving the db to the local disk using the --db-path argument.

I already have a known issue that NFS, SMB and CIFS file systems dont support file locks and therefore you can't place the DB on these. Yours is a subtly different error because for some reason you have got past the lock issue..

Please let me know if --db-path fixes the problem for you.

@wally007
Copy link
Author

In Bug #221 the user got the same error as you have and it was fixed by moving the db to the local disk using the --db-path argument.

I already have a known issue that NFS, SMB and CIFS file systems dont support file locks and therefore you can't place the DB on these. Yours is a subtly different error because for some reason you have got past the lock issue..

Please let me know if --db-path fixes the problem for you.

Thank you. It worked with --db-path option (setting it to local file system)

@gilesknap
Copy link
Owner

Thanks for letting me know.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants