Need help syncing photos with nextcloud

Nextcloud works like a charm, except syncing photos.
I’m on 4.0.1.48 (Koli)

I don’t have my own nextcloud instance. I pay some company for nextcloud.

The server adres I entered is https://somedomain.name/
Advanced settings has
/remote.php/dav/files/username for webdav
/remote.php/dav/files/username/Photos for image path
/remote.php/dav/files/username/Sailfish OS/Backups for backup path.

Backups work correctly, that proves my settings are correct.
There is a Talks folder created automatically, so the phone has that acces.
Photos don’t sync, and there is no folder created.

I have tried to delete nextcloud account settings in sailfish, and recreating it. It didn’t help.
I created the photos folder myself. It did nothing.
Sync is set to both ways. Auto sync is on. Planned sync is on for twice a day. It does make backups.

Photos are stored on the device, not on SD.

Some of the photos are important to me, and I really want them backed up automatically, as I can’t really manually back up multiple times a week. Can someone help me get photo sync working?

At the current time no auto sync of photos is done in the nextcloud implementation. You can do this manually by sharing from the gallery. There was is an app on Openrepos named Ghostcloud which had addtitional daemons that did this, but it ceased working with 3.4 I think and haven’t tested since.
I hope they’ll include this with upcoming versions.

Thank you for your reply.
I’ll just wait for an update and hope nothing will go wrong in the meantime :frowning:

I’ve been using SailSync ownCloud to sync paths manually to Nextcloud.

Combined with a systemd .path file it can even sync stuff automatically, e.g. when a photo is taken…

Is there some way that we less knowledgable people can get this working?

I just installed Ghostcloud to get auto synching working. But to no avail.

Just a couple of months ago I had it working fine. I don’t know if it was on 3.4 but I remembered it as working on SFOS 4. Anyway. I’ll try a bit more and see how it goes.

Try what @rulli proposed: sailsync owncloud. It works great on my device to sync files.

I wrote this not too long ago:

It’s not exactly trivial to set up, but not rocket science either

1 Like

I tried it, and gave up, 3 or 4 times. I get stuck with sailsync setup. It just doesn’t sync when I press sync. No feedback from app like error message or something.

I unfortunately can’t get that to work.
Bit of a doublepost, but I wanted to reply to you as well.

To see some debugging information you can run it from the terminal like this:

env LD_LIBRARY_PATH=/usr/share/harbour-io.edin.projects.sailsync-owncloud/lib/owncloud/lib /usr/share/harbour-io.edin.projects.sailsync-owncloud/lib/owncloud/bin/owncloudcmd --silent -n $here $remoteuri

Where $here and $remoteuri are the paths you have configured. You can look them up by doing:

printf ".mode list\n.separator :\nselect localpath,ocpath from syncpaths;\n" |  sqlite3  ~/.config/harbour-io.edin.projects.sailsync-owncloud/config.db

ocpath has to be appended to the webdav URI of your nextcloud server, so that remoteuri = https://nc.example.org:443/remote.php/webdav$ocpath

To make this simpler you can take the script from my link above and modify it.

Thank you for taking the time to help me :slight_smile:
I got some errors, and investigated.

For me should be
/usr/share/harbour-io.edin.projects.sailsync-owncloud/lib/owncloud/lib64 /usr/share/harbour-io.edin.projects.sailsync-owncloud/lib/owncloud/bin/owncloudcmd, probably a 10 II 64-bit thingie. I’m not on my XA2 anymore.

sqlite wasn’t installed. devel-su, then pkcon install sqlite gave an error. Trying again and it succeeded.

It took me a while to understand the rest.
/usr/share/harbour-io.edin.projects.sailsync-owncloud/lib/owncloud/lib64 /usr/share/harbour-io.edin.projects.sailsync-owncloud/lib/owncloud/bin/owncloudcmd --silent -n /home/defaultuser/Pictures https://thijsjans***************.***:443/remote.php/webdav/Photos asked me for username and password, and after entering that, it gave no output but did upload a LOT of pictures :slight_smile:

I tried to remove the --silent, but it gave too much output to be of any use. I sure could output it to a file, or pipe it to grep or something, but meh, I’ll try when easier things fail. I’m not a commandline newbie, but also not experienced enough to do such things easily on my phone’s terminal.

So I guess the app doesn´t work, but your script still should. Right?

I’ll also try to make a symlink of lib to lib64, to see if that will make the app work. It seems too obvious to me to not find that in testing, so I don´t really believe in it, but not trying will fail for sure.

But all that is for another time. It took me 1,5 hour this evening to understand everything and try stuff out, so now it is bedtime for me.

Thanks again for the help.

Erm, that I wouldn’t do, at least not in / or /usr as a general rule. This is bound to cause problems at some point in the future.

If trying stuff like this, better link /usr/lib/foo /usr/lib64/foo, not the libdir itself.

No, I was thinking of ln -s /usr/share/harbour-io.edin.projects.sailsync-owncloud/lib/owncloud/lib64 /usr/share/harbour-io.edin.projects.sailsync-owncloud/lib/owncloud/lib
I know better than tinkering with system folder locations :joy:

I did not test the app with the link in place yet.
And I did not have time to test your script yet. I will, and report back.