Sharing data over different networks

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
Portwolf
Posts: 155
Joined: 08 Oct 2018, 12:57

Sharing data over different networks

02 Jun 2019, 23:12

Hello,

I come to you with something that might be really easy.. but im not getting it.
I built an app that monitors a website for availability, and this app is running 24/7, dumping the info (times, logs, etc) on a OneDrive SharePoint folder.
I did that to be able to receive the information that the app logs in almost real-time, and wherever i am.
This also is valid for other team members.

Thing is, OneDrive is really REALLY bad at syncs sometimes, as it usually stops sync and just doesn't recover.
I have to manually access the OneDrive app on the "host" machine, pause sync and restart it, and it then dumps all the info and syncs.
That is not reliable, and i am starting to hate it with fervor..

I was looking for alternatives, and Dropbox looked good, but most people have DB accounts, and with the free one, only 1 account is available per user/computer.

I also thought about a way to connect the clients to the host app, and get the data direcly, and it whould be awesome.
Problem is that it's not on the same network, and i do not have any control over workplace network definitions.

Anyone has any ideas?
Kobaltauge
Posts: 188
Joined: 09 Mar 2019, 01:52
GitHub: MassimoCastell
Location: Germany
Contact:

Re: Sharing data over different networks

05 Jun 2019, 00:35

There are so many layers in this issue. First you need a concept.

- If the client are all in different networks, you need a central server or place to drop files. OneDrive is good, when all using one account. You can map a OneDrive with "net use" as a normal windows share.
- Do you need the sync? If not, the mapping of the share should be enough. If you need a sync you can do it by yourself. I do something similar with robocopy and my todo list.
- If your monitoring script is available through the internet, you could create a script, that communicates via sockets or provide a xml/json file on a specific port or you can create a simple REST API or.... the solutions are nearly endless.
Portwolf
Posts: 155
Joined: 08 Oct 2018, 12:57

Re: Sharing data over different networks

06 Jun 2019, 08:45

As stated, OneDrive is really bad at sync..
It craps out several times a day, and the sync is constantly having issues on the main pc.
I have to pause it and restart it several times per day.

I cannot sync by myself, because, as stated, the app constantly monitors the website and returns info to the OneDrive folder in a text format.

It's a local script on a local PC.. not internet based. :(
Kobaltauge
Posts: 188
Joined: 09 Mar 2019, 01:52
GitHub: MassimoCastell
Location: Germany
Contact:

Re: Sharing data over different networks

06 Jun 2019, 10:12

Create on that local PC a batch script. Schedule this script via windows scheduler to run every 5 min.
You can get your UID when you access onedrive via webbrowser. The UID is in the adress bar.

The script should look like:

Code: Select all

net use z: https://d.docs.live.net/<UID> /User:<username> <password>

xcopy C:\<OriginFolder>\<filename or pattern> Z:\<DestinationFolder> /i /d /y

net use z: /d
That's all to have a running sync. But you need for every <OriginFolder> or probably for every file a "xcopy" command.
And the password of your OneDrive account is in plain text in this batch script.

It's a dirty workaround but it works.
SOTE
Posts: 781
Joined: 15 Jun 2015, 06:21

Re: Sharing data over different networks

06 Jun 2019, 17:10

Portwolf wrote:
02 Jun 2019, 23:12
Hello,

I come to you with something that might be really easy.. but im not getting it.
I built an app that monitors a website for availability, and this app is running 24/7, dumping the info (times, logs, etc) on a OneDrive SharePoint folder.
I did that to be able to receive the information that the app logs in almost real-time, and wherever i am.
This also is valid for other team members.

Thing is, OneDrive is really REALLY bad at syncs sometimes, as it usually stops sync and just doesn't recover.
I have to manually access the OneDrive app on the "host" machine, pause sync and restart it, and it then dumps all the info and syncs.
That is not reliable, and i am starting to hate it with fervor..

I was looking for alternatives, and Dropbox looked good, but most people have DB accounts, and with the free one, only 1 account is available per user/computer.

I also thought about a way to connect the clients to the host app, and get the data direcly, and it whould be awesome.
Problem is that it's not on the same network, and i do not have any control over workplace network definitions.

Anyone has any ideas?
You might want to look at various freeware and opensource alternatives, which allows you to bypass having your data stored with Microsoft and Google. You can create your own public links for sharing data off of computers that you own. The data is hosted on your own computers, and as long as those computers have internet access, they can then be found by the software. You will have much greater control and more scripting options. You also don't need to setup any web servers, DDNS, etc...

1) Syncthing

https://syncthing.net/

2) Tonido

https://www.tonido.com/tonidodesktop_downloads/

3) NextCloud

https://nextcloud.com/install/
Portwolf
Posts: 155
Joined: 08 Oct 2018, 12:57

Re: Sharing data over different networks

07 Jun 2019, 03:47

Kobaltauge wrote:
06 Jun 2019, 10:12
Create on that local PC a batch script. Schedule this script via windows scheduler to run every 5 min.
You can get your UID when you access onedrive via webbrowser. The UID is in the adress bar.

The script should look like:

Code: Select all

net use z: https://d.docs.live.net/<UID> /User:<username> <password>

xcopy C:\<OriginFolder>\<filename or pattern> Z:\<DestinationFolder> /i /d /y

net use z: /d
That's all to have a running sync. But you need for every <OriginFolder> or probably for every file a "xcopy" command.
And the password of your OneDrive account is in plain text in this batch script.

It's a dirty workaround but it works.
Good one.
It will not work on this setup due to restrictions on the scheduler.
But it's a workaround i will be using soon on another setup!
Thanks :)
SOTE wrote:
06 Jun 2019, 17:10
You might want to look at various freeware and opensource alternatives, which allows you to bypass having your data stored with Microsoft and Google. You can create your own public links for sharing data off of computers that you own. The data is hosted on your own computers, and as long as those computers have internet access, they can then be found by the software. You will have much greater control and more scripting options. You also don't need to setup any web servers, DDNS, etc...

1) Syncthing

https://syncthing.net/

2) Tonido

https://www.tonido.com/tonidodesktop_downloads/

3) NextCloud

https://nextcloud.com/install/
I know NextCloud, will look into the others now.
Hopefully they are better at sync that OD.
Thanks!!
Kobaltauge
Posts: 188
Joined: 09 Mar 2019, 01:52
GitHub: MassimoCastell
Location: Germany
Contact:

Re: Sharing data over different networks

07 Jun 2019, 05:25

Portwolf wrote:
07 Jun 2019, 03:47
Good one.
It will not work on this setup due to restrictions on the scheduler.
But it's a workaround i will be using soon on another setup!
Thanks :)
If you can't use the windows' scheduler, you can create an AHK script with a timer. But therefore the AHK script has to run the whole time. And I have a solution with a script, that checks the time it last run. Unfortunately the post is in german.

https://www.autohotkey.com/boards/viewtopic.php?p=270897#p270897

Hope you find a solution
SOTE
Posts: 781
Joined: 15 Jun 2015, 06:21

Re: Sharing data over different networks

08 Jun 2019, 01:37

Portwolf wrote: I know NextCloud, will look into the others now.
Hopefully they are better at sync that OD.
Thanks!!
Might seem a little more radical, but if you know Nextcloud and want to do something other than Google Drive and OneDrive, you could setup an account at DuckDNS (free DDNS; https://www.duckdns.org/) and put up AHKhttp (https://www.autohotkey.com/boards/viewtopic.php?f=6&t=4890) or your own web server. The fun with this would be a mostly AutoHotkey solution that you control, and you control your own data.
Portwolf
Posts: 155
Joined: 08 Oct 2018, 12:57

Re: Sharing data over different networks

11 Jun 2019, 17:47

SOTE wrote:
08 Jun 2019, 01:37
Might seem a little more radical, but if you know Nextcloud and want to do something other than Google Drive and OneDrive, you could setup an account at DuckDNS (free DDNS; https://www.duckdns.org/) and put up AHKhttp (https://www.autohotkey.com/boards/viewtopic.php?f=6&t=4890) or your own web server. The fun with this would be a mostly AutoHotkey solution that you control, and you control your own data.
Well, that might just be the right step!
Will look into it asap, as there are other things pressing right now (actual work lol)
:bravo:

Return to “Other Utilities & Resources”

Who is online

Users browsing this forum: No registered users and 9 guests