After figuring out how to get the automated nightly jobs to create backups, I decided to take this one step further and push the new archive files to my ftp server, so I had a near-line backup. This proved infinitely more difficult than I had planned. First I found a package called <a href=”http://expect.nist.gov/”>Expect</a>. Expect allows you to automate manual keystrokes, taking into account the expected response from a program. I really thought I was in heaven with this package. I recorded a script, loaded it up for daily running, but once again, nothing happened.
I read dozens of Ubuntu Forum posts only to find that many others had the same problem I was running into. The more I tested my scripts, the further I seemed to be from success.
I had given up, and again, was just about to post my own plea for help, when I found an article about using FTP macros to <a href=”http://www.linux.com/feature/119510?theme=print”>automate ftp communications</a> on Linux. Where everything else had failed, a simple .netrc file holding my server credentials and a macro containing my upload directories and commands was the key.
How lucky we are today to be able to search the Internet for resolutions to information. This is the type of issue that would have never been able to be fixed by someone with my level of experience with Linux ten years ago. I’ve gotten to the point when I find an error, I just cut and paste the error text into the Google search bar. Truly amazing!
Ubuntu Cron Backups… part II
After figuring out how to get the automated nightly jobs to create backups, I decided to take this one step further and push the new archive files to my ftp server, so I had a near-line backup. This proved infinitely more difficult than I had planned. First I found a package called <a href=”http://expect.nist.gov/”>Expect</a>. Expect allows you to automate manual keystrokes, taking into account the expected response from a program. I really thought I was in heaven with this package. I recorded a script, loaded it up for daily running, but once again, nothing happened.
I read dozens of Ubuntu Forum posts only to find that many others had the same problem I was running into. The more I tested my scripts, the further I seemed to be from success.
I had given up, and again, was just about to post my own plea for help, when I found an article about using FTP macros to <a href=”http://www.linux.com/feature/119510?theme=print”>automate ftp communications</a> on Linux. Where everything else had failed, a simple .netrc file holding my server credentials and a macro containing my upload directories and commands was the key.
How lucky we are today to be able to search the Internet for resolutions to information. This is the type of issue that would have never been able to be fixed by someone with my level of experience with Linux ten years ago. I’ve gotten to the point when I find an error, I just cut and paste the error text into the Google search bar. Truly amazing!
Advertisement