February 7, 201610 yr Hi Everyone, I have had two Unraid systems for several years now, hoping to mirror them, and I never get it quite the way I want it. I think maybe Unraid doesn't support "iNotify": https://en.wikipedia.org/wiki/Inotify I have had some success with BTSync on both servers - I can't remember what didn't work so well (maybe resources, they're Celeron machines) (or maybe it was just the fear mongering about privacy). I think both BTSync and SyncThing don't actually recognize file changes on Unraid, they scan the devices. I have tried several Windows solutions like FreeFileSync, Allway Sync, and Syncovery - and while these work, they do massive scanning on the Unraid servers. I'm concerned that my Unraid servers have about a dozen drives each, and then spinning them all up, for lengthy scanning every night is going to just burn them up really quickly. Rumor has it that "rsync" might somehow be able to detect file changes without scanning, but I'm a complete noob at the command line part of Unraid. I'll learn it - if someone can validate this will work without scanning. :-) Any ideas? (Ideally, this would be a "set it and forget it" type thing - synchronizing nightly would be fine, or maybe even weekly.) Thanks, Russell
February 7, 201610 yr Do you need to be able to play files / access files of the secundary system ? I have my second system setup solely as a crashplan target..
February 7, 201610 yr Author Hi Helmonder, Thanks for the idea. I was hoping to be able to play and access files. Eventually, I'm hoping to move my second Unraid offsite so mirroring in both directions would be nice. I use CrashPlan too - as my backup solution. I can tell you from experience that it takes an eternity to download a 4TB recovery from them, but the price is right. :-) Russell
February 7, 201610 yr Uploading is hell also.. I am using them solely in the free version and backup up towards my second unraid system.. Not using their cloud.
February 8, 201610 yr Author Hi everyone, It'd be ideal if someone finishes the Docker for this https://lime-technology.com/forum/index.php?topic=39646.msg443005#msg443005 I'm trying to slog through this the command line way. :-) I presume that if I can figure out the commands I need, I can write them to my go file or something and get them to run on reboot. I'll want this a scheduled task, of course. I have come to realize that I probably cannot do BIDIRECTIONAL SYNC with rsync, because we'd have to save status somewhere. If I'm wrong, please help. I guess Unison would do this - if the docker were Unraid compatible? https://github.com/leighmcculloch/docker-unison Here's what I have so far (essentially this only does a backup of changes; it doesn't do a bidirectional sync - the delete will delete files on the destination (tower2) when they are deleted on the local machine): # First, note that this script is CaSeSeNsItIvE, so properly case your shares/folders/etc. # [url]http://lime-technology.com/forum/index.php?topic=19503.0#msg173219[/url] AND # [url]https://lime-technology.com/wiki/index.php/Transferring_Files_from_a_Network_Share_to_unRAID[/url] # Make a local folder on the machine to run the script - this directory will reference the other Unraid machine # (replace "tower2" with the name of your second Unraid; replace "folder" with the name of the folder you # want to save to on that server): # Example: mkdir /mnt/tower2_movies mkdir /mnt/tower2_folder # Connect the above folder you created (replace "filemove" with your username (root doesn't seem to work, # so you'll have to create a new user in Unraid's GUI), replace "mypassword" with your password, replace # both instances of "tower2" with the name of your other Unraid machine (as above), replace both instances # of "folder" with the name of the folder you want to save to on the other server (as above): # Example: mount -t cifs -o sec=ntlm,user=filemove,password=mypassword //tower2/movies /mnt/tower2_movies mount -t cifs -o sec=ntlm,user=filemove,password=mypassword //tower2/folder /mnt/tower2_folder # As a check, at this point, you can run Midnight Commander and see that the new "tower2_folder" maps to the # appropriate folder on tower2. # Run RSync (there are lots of options: [url]http://ss64.com/bash/rsync_options.html[/url] rsync -a -u -s --delete /mnt/user/localfolder/ /mnt/tower2_folder/ That seems to work - at least in testing. Can you please review it? :-) And how do I schedule it? Thanks, Russell
February 8, 201610 yr Hi Everyone, I have had two Unraid systems for several years now, hoping to mirror them, and I never get it quite the way I want it. I think maybe Unraid doesn't support "iNotify": https://en.wikipedia.org/wiki/Inotify iNotify isn't installed by default, but some plugins use it. It's also part of the "Nerd Pack Tools Plugin" Rumor has it that "rsync" might somehow be able to detect file changes without scanning, but I'm a complete noob at the command line part of Unraid. I'll learn it - if someone can validate this will work without scanning. :-) Rsycn is a good tool to sync two systems, however it's hard to make it run automatically since you first have to set up password-less ssh login. Also it still need to scan the files to determine what has changed. It might not do a complete scan and only look for timestamp for updates, but it still has to spin the disk up.
February 8, 201610 yr Rsycn is a good tool to sync two systems, however it's hard to make it run automatically since you first have to set up password-less ssh login. Also it still need to scan the files to determine what has changed. It might not do a complete scan and only look for timestamp for updates, but it still has to spin the disk up. I was messing around with remote ssh login last weekend (I wanted to execute an sql command to clear the watched status of my openelec machines as a result of a condition which occurred on a remote machine - which I managed) as telnet wasn't an option. *** WARNING: Autologin through ssh can "and in MOST cases probably SHOULD" be achieved by generating public/private rsa key pair. Please consider your own needs and or security of your systems before using what I post below. I use this behind multiple firewalls and access on the LAN is not an issue.*** USE AT YOUR OWN RISK! Here is what I used to achieve it: scriptname: sshnopassword #!/usr/bin/expect -f # # syntax: sshnopassword password host command set password [lindex $argv 0] set host [lindex $argv 1] set command [lindex $argv 2] spawn ssh $host $command expect { # Agree to modify known_hosts if prompted "(yes/no)?" { send -- "yes\r" exp_continue } # Enter the password "*?assword:*" { send -- "$password\r" } } interact example execution using the script I used to execute an sql script on my living room KODI/Openelec machine (note variable1=password, variable2=host, variable3=command): expect sshnopassword openelec root@livingroom-htpc "sqlite3 /storage/.kodi/userdata/Database/MyVideos93.db < /storage/.kodi/userdata/daniels-scripts/ckw.sql" If this helps you, I am glad!
Archived
This topic is now archived and is closed to further replies.