BDavisNJ Posted October 7 Share Posted October 7 (edited) does anyone know how to script a #!/bin/bash instruction to move files from a C4 controller to a hard drive? Specifically, I am looking to have my Synology NAS drive run a scheduled script to move some Chowmain Events files to a location on my NAS. I have tried dozens of variations and I cannot get the script to find the files on the C4 controller. This effort is to address an issue in which Chowmain SMTP driver does not permit attachments above a certain size. An alternative solution would be to recommend a SMTP driver that permits attachments greater than 1mb. I am running the script as user Admin. I have tried: #!/bin/bash NOW=$(date +%m%d%y) cp 192.168.57.96:/log/debug/chowmain_event_logger.log "Rodger_Wattkins/DiskC/Computer and Technology/Control4/C4 backups/log files/${NOW}" Thank you Edited October 7 by BDavisNJ changes maximum file size Quote Link to comment Share on other sites More sharing options...
Popolou Posted October 8 Share Posted October 8 Because cp is really only used for the local system, not for directly grabbing files across a network (that's where you use scp). You could first create a mountpoint to the controller and then do a cp but that is more work. However, since the controller is running samba and the folder permissions are open, it should make matters quite simple. If you have the smbget package, i'd do smbget smb://192.168.57.96/log/debug/chowmain_event_logger.log in the directory of choice. You can create the folder in advance of the script. Quote Link to comment Share on other sites More sharing options...
BDavisNJ Posted October 8 Author Share Posted October 8 @Popolouthank you for your reply. I will get familiar with smbget. 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.