What would be the best way of going about the following problem?
I have a server that I periodically dump backups to. The only way to connect to this server is via OpenVPN. So far I tested everything manually and it worked fine. Here's what I do:
- run openvpn --config my-server-connection-details.ovpn
- in second screen console window I mount NFS share, perform the copy and unmount it
- I go back to screen console 1 and ctrl+c the connection.
How can I best script it so I can just put it in cron? I'm mostly inquiring about the openvpn part, as the rest seems clear to me and I'm an OpenVPN / VPN newbie. The client is a linux machine.
Thanks in advance.