Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have a folder full of files in a windows file share on the network. I need to grab that folder every day and put it on a few linux (ubuntu) computers. I was wondering what is the easiest way to do that automatically (script-wise).
I myself might do the FTP/SFTP option.. but not as my first choice. I would keep these files shared on the windows side and use smbclient/cron task to PULL them from the windows machine to the linux clients via bash script. I think this a mostly the same idea that @FrankThomas is eluding to. mount with rsync would be a nice touch :) Linux accessing windows share is SUPER easy (pull). FTP is mostly easy (push). Getting permissions right with samba as a server (push) sucks (but is also VERY possible).
If you do use samba client to mount and rsync, but sure to umount after. All hell breaks loose (on the linux side) if the windows share goes down while mounted. You WILL NOT like it ;)
rsync
the files somewhere local, and then rsync them to the remote linux systems via ssh/sftp.mount
withrsync
would be a nice touch :) Linux accessing windows share is SUPER easy (pull). FTP is mostly easy (push). Getting permissions right with samba as a server (push) sucks (but is also VERY possible).mount
andrsync
, but sure toumount
after. All hell breaks loose (on the linux side) if the windows share goes down whilemount
ed. You WILL NOT like it ;)