This question already has answers here:
Is there any salt function or state to copy folder/files from minion to minon or minion to master?
(3 answers)
Closed 7 months ago.
I want to copy files from one minion to another using saltstack state.
I did not find a useful info.
there is no direct way to do this within salt. salt just was not made for this. however the best option would be to use something made for this purpose and use salt to work with it. such as rsync
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.rsync.html
Related
This question already has answers here:
Can you call out to FFMPEG in a Firebase Cloud Function
(7 answers)
Closed 2 years ago.
I want to use ffmpeg as described here:
https://github.com/firebase/functions-samples/blob/master/ffmpeg-convert-audio/functions/index.js
ffmpeg-static contains binaries. I am using Windows 10 and want to upload the code using firebase deploy.
However I do not understand what I need to do to get this to work. The binaries that will be installed on my PC are of course different from those needed by the cloud firebase (https://www.npmjs.com/package/ffmpeg-static).
How can I do this?
When you deploy Cloud Functions, the deployment process doesn't include the contents of node_modules from your local machine. Google infrastructure will effectively run npm install for you and rebuild the entire thing in an environment that matches your target Cloud Functions runtime. As such, you will get the correct binaries with your function. It doesn't matter that you developed on Windows, and there is (in theory) nothing you have to do to get the function to work, as long as you wrote platform-independent code.
If you have a specific problem, your question should show what, including any code and error messages one would use for debugging.
This question already has answers here:
sftp get files with R [closed]
(1 answer)
Schedule weekly Excel file download to an unique name
(1 answer)
Closed 4 years ago.
My company´s data department uploads a .csv file daily to a remote folder that I can only access through my company's network using FileZilla.
Everyday, I use the newest .csv file and process the data in R. I want to automate this process. I want to access the daily .csv file by reading the .csv file from the remote folder using the read.csv function in R.
How can I tell FileZilla to copy the file in the shared folder to a local folder in my PC and do this everyday at 6:00 a.m.? If this isn't possible, how can I access the remote folder through R and read the .csvfile from there?
Thanks in advance!
EDIT:
As seen here, FileZilla does not allow any sort of automation. You can use the client WinSCP instead, write a script to download/upload files from/to a remote SFTP server and schedule the script to run every n days using Windows Task Scheduler.
Now, in order to access an SFTP server from R, you can use the RCrul package. Unfortunately, this closed question (which was closed because it was not even a question to begin with) purges unwanted lines of code from an FTPserver (even though the title says SFTP) and it doesn't specify the user, password nor port specs. Moreover, it uses the write.lines() command, which as I understand, is used to create, not download files.
This question specifically refers to downloading a .csv file from a shared folder using SFTP protocol. Given that FileZilla is no good for this, how can I manage to do this in R using RCurl?
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Reference for proper handling of PID file on Unix
Is the .pid file in unix created automatically by the operating system whenever a process runs OR should the process create a .pid file programmatically like "echo $$ > myprogram.pid" ?
The latter holds true -- a process must create the .pid file (the OS won't do it). pid files are often used by daemon processes for various purposes. For example, they can be used to prevent a process from running more than once. They can also be used so that control processes (e.g. apache2ctl) know what process to send signals to.
This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
sqlite is not working.
i am tried hard to connect sqlite database using php. after lot of search, i found to include the below lines in php.ini. i am not sure where to include.
extension=php_pdo.dll
extension=php_sqlite.dll
i could't find even a word called sqlite in php.ini. can any give the sample php.ini with sqlite enable
If your connect to sqlite from pdo try (maybe) set in php.ini odbc.allow_persistent = On
When i install centos 5 to my server and check all repositories i don't find php-sqlite module and developers compile php without sqlite. I use PDO php function for sqlite:
$x = new PDO("sqlite:......");
And i thing your can try odbc.allow_persistent = On
This is ASP classic, not .Net. We have to get a way to SFTP into a server to upload and download a couple of files, kicked off by a user.
What have other people used to do SFTP in ASP classic? Not necessarily opposed to purchasing a control.
If you have the ability to use WScript.Shell then you can just execute pscp.exe from the Putty package. Obviously this is less then ideal but it will get the job done and let you use SCP/SFTP in classic ASP.
The way I have done this is to create a command script file and pass this on the command line via the /b command to psftp.exe. I have also tried this in Perl and have yet to find a neater way of doing it.
There is an issue with this method, in that you already have to have accepted the RSA finger-print. If not, then the script will either wait for user input to accept it or will skip over it if you are running in full batch mode, with a failure. Also, if the server changes so that it's RSA finger-print changes (e.g. a cluster) then you need to re-accept the finger-print again.
Not an ideal method, but the only one I know.
I shall be watching this question incase anyone knows another way.
There is an issue with this method, in that you already have to have accepted the RSA finger-print. If not, then the script will either wait for user input to accept it or will skip over it if you are running in full batch mode, with a failure. Also, if the server changes so that it's RSA finger-print changes (e.g. a cluster) then you need to re-accept the finger-print again.
I've previously used a component from here: www.weonlydo.com. I didn't find it the easiest piece of kit to develop against but it got the job done in a hurry.
I used to do that with FTP on Windows (create a file of commands and shell out FTP.exe).
December 2020 :
ASP is dead, it has been superseded by ASP .Net 18 years ago.
At this time, the most common way to use SFTP in .Net is to use the SSH.NET NuGet package.
Maybe this question should be closed ?