Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other options than SSH? #25

Open
mgutt opened this issue May 18, 2020 · 1 comment
Open

Other options than SSH? #25

mgutt opened this issue May 18, 2020 · 1 comment

Comments

@mgutt
Copy link

mgutt commented May 18, 2020

I tried to sync two databases. The external one is mounted through rlcone as follows:
rclone mount --max-read-ahead 1024k --allow-other synosftp: /mnt/cloud/synosftp

Now I tried to sync both databases by passing an empty start/stop command (as the external plex server has been already stopped):

./plex-db-sync \
	--dry-run true \
	--backup true \
	--nocomparedb true \
	--plex-db-1 "/mnt/externalDB/com.plexapp.plugins.library.db" \
	--plex-start-1 "#" \
	--plex-stop-1 "#" \
	--plex-db-2 "/mnt/localDB/com.plexapp.plugins.library.db" \
	--plex-start-2 "service plexmediaserver start" \
	--plex-stop-2 "service plexmediaserver stop" \

As you can see I enabled --nocomparedb as it else returns "Versions of plex databases not equal" although both servers have the exact same version (?).

But sadly it returns multiple disk I/O errors:

[Mon May 18 10:25:15 UTC 2020] Starting.
[Mon May 18 10:25:15 UTC 2020] Stopping Plex on Server 1... Done
[Mon May 18 10:25:15 UTC 2020] Stopping Plex on Server 2... Done
[Mon May 18 10:25:18 UTC 2020] Checking for changes... Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
Found
mount: permission denied (are you root?)
Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
Error: near line 1: unable to open database: /mnt/externalDB/com.plexapp.plugins.library.db
Error: near line 1: no such table: tmpdb.metadata_item_settings2
[Mon May 18 10:25:18 UTC 2020] Processing tags...
Error: no such table: taggings1
Error: no such table: taggings1
Error: no such table: taggings2
Error: no such table: taggings2
Error: unable to open database "/mnt/externalDB/com.plexapp.plugins.library.db": disk I/O error
./plex-db-sync: line 416: declare: rows: not found
[Mon May 18 10:25:21 UTC 2020] Starting Plex on Server 1... Done
[Mon May 18 10:25:21 UTC 2020] Starting Plex on Server 2... Done
[Mon May 18 10:25:21 UTC 2020] Finished.

So my next idea was to copy the external database to my local server and this seems to work except of one mount permission error:

[Mon May 18 10:44:21 UTC 2020] Starting.
[Mon May 18 10:44:21 UTC 2020] Stopping Plex on Server 1... Done
[Mon May 18 10:44:21 UTC 2020] Stopping Plex on Server 2... Done
[Mon May 18 10:44:24 UTC 2020] Checking for changes... Found
mount: permission denied (are you root?)
[Mon May 18 10:44:29 UTC 2020] Processing tags...
[Mon May 18 10:44:29 UTC 2020] Processing for  (0)...
[Mon May 18 10:44:29 UTC 2020]   - Checking records that are in both databases
[Mon May 18 10:44:29 UTC 2020]   - Checking records missing from server 2

So it looks like plex-db-sync works only through SSH connection. Are there any plans to make it a little bit more flexible allowing already mounted external databases or local copies?

@morphixz0r
Copy link

morphixz0r commented Jul 19, 2020

I can comment on local atleast working for me (did this yesterday).

I scp'd a large db (around 300mb) i wasn't comfortable in doing across SSH to the local server and use dummy start/stop (echo) and this synced both fine.

scp'd the remote db back to the original box and started plex on both - all upto date.

The error you received seems to indicate a permission issue on the external mounted db - Have you checked this first?

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

No branches or pull requests

2 participants