Sync script from Debian [Samba share] to Owncloud

Hi!
I’m a new user of Owncloud, I’m replacing an older fileserver hosted by MS Windows Server and migrating to a modern solution… but I have a (little) bottle neck:

We are a healthcare clinic and there are a lot of documents who need to be scaned and saved to a fileserver for future access.

I’ve made a new server running GNU/Linux Debian 10, Owncloud is working and I started too a Samba Server with a share where all the scaners (multifunction printers with network scan capabilities) save the documents.

My problem is how to made an automatic upload from my “incoming” files to the Owncloud database (I have just one user for each team and one share to upload files) I need to schedule a script to run every one minute, copy all the files from shared folder and upload to owncloud [and remove/move from share to avoid new updates every time the script runs].

There is a way to do this?

Thanks for your support!!!

Gerardo Ponce
Mar del Plata - Argentina

Hola Gerado,

I have a few questions to provide you a more accurate answer:

What happened with the old Windows server? with that server we could use WND Listener and the problem would be immediately solved.
Why can’t you connect the Printer and Scanners with the Sync-client? this could be a solution too.
The SMB server is not the same machine as the oC Server? Why are they separated?
How do you connect the SMB Folder with the oC Folder?

Running a Files-Scan could be a heavy load solution depending of the size of the folder.

Best regards,
Carlos

2 Likes

Hola Carlos!

First of all thanks for your very quickly response!!

1st question: The older server has more than 8 years old, the Windows version has no more updates from a longtime and the hardware is old too. So I decided to move at least several teams to the new scenario with Owncloud.

2nd question: The option of Sync-Client is very interesting

3th question: The SMB is on the same server where I’m running oC. My idea was to make a SMB share available for upload files from the scaners/mfps (but is not as simple as upload files to the same folder of oC data…)

I going to look more deeply the Sync-Client and its options of configuration.

Estamos en contacto!!! :slight_smile:
Gerardo

1 Like

Hola Gerado,

The Sync-client would be in your case the best option.

Adding directly in the storage and using the webUI could be as workaround adding this line in the config.php

  'filesystem_check_changes' => 1,

but that will make the system little slower.
You have to add the files and folders with the apache user permits otherwise will be only read only files.

Espero que la infomación te sirva.
Saludos
Carlos

3 Likes

DONE!

With the Sync-Client its working!!

I’ve created a folder “scaninbox” shared by Samba Server, the sync-client runs under a user with write privileges on that folder and it make the sync with my Owncloud user profile.

I close this thread so…

Hasta pronto!

Gerardo

2 Likes