Gio Posted January 7, 2014 Report Share Posted January 7, 2014 (edited) Hii'm using a remote linux machine (no gui) as read-only client but i can't find the setting for "Restore original version of modified files" that i see in the windows gui (searched in complex.conf too). The server is started via config file and all seems to work perfectly except this thing. I need this because (even if it is a ro client) this server will be the main source for all other clients and if i delete a single file it will not be restored from the original source. Best Regards and Compliments. Edited January 7, 2014 by Gio Quote Link to comment Share on other sites More sharing options...
lolcat Posted January 8, 2014 Report Share Posted January 8, 2014 You want a read-only node to add files? Do I have to say more? Quote Link to comment Share on other sites More sharing options...
jaapp Posted January 8, 2014 Report Share Posted January 8, 2014 (edited) Lolcat, i assume OP is looking for the "restore modified files to original version" option, which you can find the web interface under the folder preferences in the advanced tab. OP wants to know how to configure this without a (web) gui. Which is a perfectly reasonable question. Afaik this configuration setting is not documented. Edited January 8, 2014 by jaapp Quote Link to comment Share on other sites More sharing options...
lolcat Posted January 8, 2014 Report Share Posted January 8, 2014 Lolcat, i assume OP is looking for the "restore modified files to original version" option, which you can find the web interface under the folder preferences in the advanced tab. OP wants to know how to configure this without a (web) gui. Which is a perfectly reasonable question. Afaik this configuration setting is not documented. "This is a folder with read only permissions. Modifications made in such a folder will not be displayed on other devices."I don't see how this doesn't conflict with restoring original versions. But I will setup some test nodes to test the behavior. Now I got a little curious what it does. I see two possibilities: 1) revert any changes I do locally 2) revert any changes anyone else does. Quote Link to comment Share on other sites More sharing options...
Gio Posted January 8, 2014 Author Report Share Posted January 8, 2014 (edited) @lolcat Who told you that? 1. The Main node is in my house and it is NOT read only.2. The linux server is a RO node and get all the files from my HOME node when is online.3. Other clients that i run (laptops, phones, etc.) have the LINUX RO node as main source of all the files because my HOME main node is not always online right? So the linux node is a RO node but he can be used as primary source when my home node is offline for all others secondary clients right? Now, if you see in the options of a windows client when is connected as RO node you can find a checkbox -> "Restore original version of modified files" (or something similar i'm translating from italian sorry)this check enabled on a RO node restores every file in the folder even if you modify it or delete it (on the RO node) taking the original version from another node... The only thing i want is-> how to setup a linux NON-GUI RO client whit this option....(what i need to write in the config file to have the same functionality of the windows counterpart) P.S. @ lolcatMaybe i was not completely clear in my first post, maybe you are a little stressed to always reply to newbies on this forum, but i find unnecessary over-reaction in your reply. Edit:@jaapp thanks for clarification i was writing this response while you was writing your so i've not read Edited January 8, 2014 by Gio Quote Link to comment Share on other sites More sharing options...
jaapp Posted January 8, 2014 Report Share Posted January 8, 2014 Gio, you don't want to have a RO folder in that scenario at all. You need to see RO folders as one way streets: They can be updated, but they never update other machines. If you make the folder on the server RO it will only accept updates from other machines, but never propagate these updates. In your case you want: Client1 (RW) <-> Server (RW) <-> Client2 (RW) Not: Client1 (RW) -> Server (RO) <- Client2 (RW) Otherwise Client1 and Client2 will never update each other unless they are both online at the same time. Quote Link to comment Share on other sites More sharing options...
lolcat Posted January 8, 2014 Report Share Posted January 8, 2014 Oh, I do appologize. You find that by clicking the gear icon under "Secret/QR" next to the "X" in the "Sharing" column. Then you press advanced. If you can't find these I can attach some screenshots.I am sorry I am blunt, I am from the north and drink far too much coffee. I still don't understand why the files on a read-only node would be changed, but I am sure it makes perfect sense.So let me know if you can't find it and Ill make screenshots. Gio, you don't want to have a RO folder in that scenario at all. You need to see RO folders as one way streets: They can be updated, but they never update other machines. If you make the folder on the server RO it will only accept updates from other machines, but never propagate these updates. In your case you want: Client1 (RW) <-> Server (RW) <-> Client2 (RW) Not: Client1 (RW) -> Server (RO) <- Client2 (RW) Otherwise Client1 and Client2 will never update each other unless they are both online at the same time. I am pretty sure you are wrong here. The read-only can't seed the files? It can't update the database? Either way it sounds like a bug... Quote Link to comment Share on other sites More sharing options...
jaapp Posted January 8, 2014 Report Share Posted January 8, 2014 I am pretty sure you are wrong here. The read-only can't seed the files? It can't update the database? Either way it sounds like a bug... From the manual: Read only secret is generated on the basis of the master secret and is used for one-way synchronization. It means that any folder with a read-only secret will be fully synced, but changes made in it will not be reflected in the folders operated by a master secret. Also, it is not possible to change secret for read only folders. Quote Link to comment Share on other sites More sharing options...
lolcat Posted January 8, 2014 Report Share Posted January 8, 2014 Yes, they can't change the share, but they can seed any changes that has been made with a read-write secret. Quote Link to comment Share on other sites More sharing options...
jaapp Posted January 8, 2014 Report Share Posted January 8, 2014 Well, I was talking about updates wasn't I.. Quote Link to comment Share on other sites More sharing options...
lolcat Posted January 8, 2014 Report Share Posted January 8, 2014 Well, I was talking about updates wasn't I.. Seeding an updated version will UPDATE the files... Quote Link to comment Share on other sites More sharing options...
Gio Posted January 8, 2014 Author Report Share Posted January 8, 2014 ...I am sorry I am blunt, I am from the north and drink far too much coffee. I still don't understand why the files on a read-only node would be changed, but I am sure it makes perfect sense.... took me 10 min to translate a reply that was not too offensive i'm glad we have not started a flame Well, I was talking about updates wasn't I.. In this very moment i've shutdown my MAIN node at HOME and another windows client is updating from the RO linux server only.So i think is doable.I think that this is pretty normal in a BitTorrent-like network. I need that option because sometimes on the linux server things can go bad and something (by my fault) is deleted....I like to play like a mad horse on that server and one day or another i will do a mess.... i know also...without that option...if you delete a file in the RO server...no matter what you do after....it will be always deleted again and again if you try to restore it manually, even if it exists on the main node....something in some database mark that item as deleted and keep delete it when you manually restore it From the manual: Read only secret is generated on the basis of the master secret and is used for one-way synchronization. It means that any folder with a read-only secret will be fully synced, but changes made in it will not be reflected in the folders operated by a master secret. Also, it is not possible to change secret for read only folders. All clients will seed each other no matter the source, if it is a good file it will be transferred.I'm testing right now the same configuration of above and now i've shared the main key with the third client so a full client can sync from an RO client even if the main node is offline. I assume that the modifications made from anoter FULL node will be transmitted to the MAIN node when it will be online. P.S."Main","secondary" and "full" are not good words in a torrent environment but i use them for clarity. Quote Link to comment Share on other sites More sharing options...
lolcat Posted January 8, 2014 Report Share Posted January 8, 2014 took me 10 min to translate a reply that was not too offensive i'm glad we have not started a flame In this very moment i've shutdown my MAIN node at HOME and another windows client is updating from the RO linux server only.So i think is doable.I think that this is pretty normal in a BitTorrent-like network. I need that option because sometimes on the linux server things can go bad and something (by my fault) is deleted....I like to play like a mad horse on that server and one day or another i will do a mess.... i know also...without that option...if you delete a file in the RO server...no matter what you do after....it will be always deleted again and again if you try to restore it manually, even if it exists on the main node....something in some database mark that item as deleted and keep delete it when you manually restore it All clients will seed each other no matter the source, if it is a good file it will be transferred.I'm testing right now the same configuration of above and now i've shared the main key with the third client so a full client can sync from an RO client even if the main node is offline. I assume that the modifications made from anoter FULL node will be transmitted to the MAIN node when it will be online. P.S."Main","secondary" and "full" are not good words in a torrent environment but i use them for clarity. How this is done is fairly interessting, if you could manipulate the database to add and remove files that would be pretty baad. Quote Link to comment Share on other sites More sharing options...
dwerder Posted January 13, 2014 Report Share Posted January 13, 2014 (edited) Hello, i have a questions in the same direction. On linux servers, when i set the option "Restore modified files to original version", i can see that in the binary file sync.dat a parameter "overwrite" is set from 0 to 1. So the question is: Can I set this parameter in the config file? "shared_folders" : [ {// use --generate-secret in command line to create new secret "secret" : "MY_SECRET_KEY", // * required field "dir" : "/tmp/bla", // * required field// use relay server when direct connection fails "use_relay_server" : true, "use_tracker" : true, "use_dht" : false, "search_lan" : true,// enable SyncArchive to store files deleted on remote devices "use_sync_trash" : true,// specify hosts to attempt connection without additional search "known_hosts" : [// "192.168.1.2:44444" ] } ]I tried "overwrite: true" but just get an error saying that key overwrite is invalid. So i cant change this bit with sed: sed -i 's/overwritei0e22/overwritei1e22/g' .sync/sync.dat But this is ... lets say a little bit dirty So is their a hidden key or whatever to set this in the config file? Kind regards Edited January 13, 2014 by dwerder Quote Link to comment Share on other sites More sharing options...
lockhead Posted January 14, 2014 Report Share Posted January 14, 2014 I'm searching for the same solution, I like the sed approach but don't like the risks with that. Would be better to have an official switch in the config file... Quote Link to comment Share on other sites More sharing options...
gmosquera Posted March 4, 2014 Report Share Posted March 4, 2014 Same here. It would be nice to have that for the config file. Maybe next release?. Thanks dwerder for the finding. At least that will keep my setup going until there is another option. Quote Link to comment Share on other sites More sharing options...
gmosquera Posted June 19, 2014 Report Share Posted June 19, 2014 Now you can put the option on the config file under the folder config to sync: Overwrite_Changes = true Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.