How to synchronize files from linux to windows
-
Hi ,I am looking to establish a connection between a linux device and my QT in windows to sync files from a folder which contains (CSV,PDF and some DB) files.
In what ways can we do that ?@Srinath_S
Can you explain a bit more in detail, how you wish to do that?
rsync is designed for such kind of jobs. -
@Srinath_S
Can you explain a bit more in detail, how you wish to do that?
rsync is designed for such kind of jobs.@Axel-Spoerl I have an application in my linux device which stores data into a folder ,now I want to access the same folder from windows and sync the files in both device.
-
@Axel-Spoerl I have an application in my linux device which stores data into a folder ,now I want to access the same folder from windows and sync the files in both device.
And what has this to do with Qt? Do you want to programm a software for this task?
-
And what has this to do with Qt? Do you want to programm a software for this task?
@Christian-Ehrlicher Yeah, so that I can view all the data as I view in linux device's QT program.I have a replica of the program from linux ,just need help to view the same and be able to access the files and sync it in windows device QT program.
Thank you. -
@Christian-Ehrlicher Yeah, so that I can view all the data as I view in linux device's QT program.I have a replica of the program from linux ,just need help to view the same and be able to access the files and sync it in windows device QT program.
Thank you.The easiest way is to use WinSCP and connect via ssh to your linux server.
Everything else - e.g. programming it by yourself is way to complicated for beginners. -
@Christian-Ehrlicher Yeah, so that I can view all the data as I view in linux device's QT program.I have a replica of the program from linux ,just need help to view the same and be able to access the files and sync it in windows device QT program.
Thank you.@Srinath_S
Of if you really want to share the files (as opposed to replicate, with all the headaches that entails) consider using Samba maybe. -
@Srinath_S
Of if you really want to share the files (as opposed to replicate, with all the headaches that entails) consider using Samba maybe. -
@JonB Thank you for the suggestion, I already installed samba and also I am able to access files in a remote way , but I was thinking to create a mini version of my software in windows too, so that it might be user friendly for my project.
@Srinath_S
samba versus scp are quite different approaches to your requirement. samba just means the same files can be shared (e.g. after editing content is same accessed from anywhere), and is "simpler" (in that there is nothing to do other than install samba), scp (or other) is about copying/replicating. Only you know whether your use case allows sharing rather than copying. -
@Srinath_S
samba versus scp are quite different approaches to your requirement. samba just means the same files can be shared (e.g. after editing content is same accessed from anywhere), and is "simpler" (in that there is nothing to do other than install samba), scp (or other) is about copying/replicating. Only you know whether your use case allows sharing rather than copying.@Srinath_S
Maybe it's worth having a look at the architecture of your application.- You have one application, which runs on Linux and Windows.
- On windows, you want to see (i.e. read-only) files residing on Linux.
Questions:
- Do you just want to see a list of files, or do you actually want to access them?
- Is the sharing runtime critical, i.e. the app has to run on Linux and Windows at the same time to make sense?
- Can the file sharing be separated from the app?
IMHO, if file sharing across computers and OSes is a requirement for an app to make sense, there is something wrong in its client/server architecture. Better implement a REST API, but that's complicated on the other hand, as @Christian-Ehrlicher rightfully said. If file sharing is needed anyway between the computers involved, you may want to have a look at mutagen. This is a very powerful tool, which I am a heavy user of.
-
@Srinath_S
Maybe it's worth having a look at the architecture of your application.- You have one application, which runs on Linux and Windows.
- On windows, you want to see (i.e. read-only) files residing on Linux.
Questions:
- Do you just want to see a list of files, or do you actually want to access them?
- Is the sharing runtime critical, i.e. the app has to run on Linux and Windows at the same time to make sense?
- Can the file sharing be separated from the app?
IMHO, if file sharing across computers and OSes is a requirement for an app to make sense, there is something wrong in its client/server architecture. Better implement a REST API, but that's complicated on the other hand, as @Christian-Ehrlicher rightfully said. If file sharing is needed anyway between the computers involved, you may want to have a look at mutagen. This is a very powerful tool, which I am a heavy user of.
@Axel-Spoerl Thank you for your reply
1)From windows I read or view the files.
2)I should be able to access the files , means download or view them from ui-widgets in windows.
3)No, the linux app need not need to run while windows is running as I access a specific folder not anything while run time of linux.
4)Yes , the file sharing is totally out of the app only.But file access shouldnt affect if at all I run both device at the same time(which is a rare case scenario). -
@Axel-Spoerl Thank you for your reply
1)From windows I read or view the files.
2)I should be able to access the files , means download or view them from ui-widgets in windows.
3)No, the linux app need not need to run while windows is running as I access a specific folder not anything while run time of linux.
4)Yes , the file sharing is totally out of the app only.But file access shouldnt affect if at all I run both device at the same time(which is a rare case scenario).out of the app only
Just to make sure I get you right: You mean inside the app only. So the shared files should not be visible directly in the Windows machine, e.g. in Explorer or for other apps.
That makes the use case more complicated, because you basically want to implement a remote file browser.
Dolphin from KDE does that. You can look at the implementation and even copy/paste what is needed. -
out of the app only
Just to make sure I get you right: You mean inside the app only. So the shared files should not be visible directly in the Windows machine, e.g. in Explorer or for other apps.
That makes the use case more complicated, because you basically want to implement a remote file browser.
Dolphin from KDE does that. You can look at the implementation and even copy/paste what is needed.@Axel-Spoerl Yes you're correct,I dont need them to be viewed in my Windows files , I want it to be viewed inside the QT app in windows.
-
@Axel-Spoerl Yes you're correct,I dont need them to be viewed in my Windows files , I want it to be viewed inside the QT app in windows.
@Srinath_S
To summarize:
This thread says "How to synchronize files from linux to windows".
The answer is: With rsync, mutagen, scp, samba or any similar tool.The actual intention is to implement a remote file browser. That's way more complex, Dolphin can be an aspiration.