Dear linuxers,
Needing to regularly backup my work, and having recently developed an interest in shell commands, I wrote myself a script that backed up a particular file; renamed the previous backup; and then unmounted the pen drive. Fairly beginner stuff but a time-and-effort-saver.
I was wondering if I could add to this script the capability to make a net backup-- invoke wvdial, fire up evolution; in evolution, mail to gmail; then close evolution; then close wvdial (I use Rel. Netconnect, so wvdial); and write me a logfile which I could check.
I'm on Ubuntu 9.04.
I'd heard that g/lin is great for automating stuff like this. Would appreciate your help. Do tell me what additional information you would require.
I'm sure this script will help many beginners like me.
Thanks and regards Suhit Kelkar
On Sat, Sep 5, 2009 at 11:16 AM, Suhit Kelkar suhitkelkar@gmail.com wrote:
Dear linuxers,
Needing to regularly backup my work, and having recently developed an interest in shell commands, I wrote myself a script that backed up a particular file; renamed the previous backup; and then unmounted the pen drive. Fairly beginner stuff but a time-and-effort-saver.
I was wondering if I could add to this script the capability to make a net backup-- invoke wvdial, fire up evolution; in evolution, mail to gmail; then close evolution; then close wvdial (I use Rel. Netconnect, so wvdial); and write me a logfile which I could check.
you may use mutt a terminal based email program, we use a similar script and cron for regular backups. Mail me off-list.
On Sat, Sep 5, 2009 at 11:16 AM, Suhit Kelkarsuhitkelkar@gmail.com wrote:
Needing to regularly backup my work, and having recently developed an interest in shell commands, I wrote myself a script that backed up a particular file; renamed the previous backup; and then unmounted the pen drive. Fairly beginner stuff but a time-and-effort-saver.
Good
I was wondering if I could add to this script the capability to make a net backup-- invoke wvdial,
OK
fire up evolution; in evolution,
No. Evolution is a GUI. In shell scripting one usually would use command line programs. In this case you would be better off using the command sendmail
e.g. ( echo "To: Suhit Kelkar suhitkelkar@gmail.com" echo "From: someid@yourdomain" echo "Subject: My second shell script" echo cat some_path_on_your_host/some_file ) | sendmail -fsomeid@yourdomain suhitkelkar@gmail.com
On Saturday 05 September 2009, Suhit Kelkar wrote:
Dear linuxers,
Needing to regularly backup my work, and having recently developed an interest in shell commands, I wrote myself a script that backed up a particular file; renamed the previous backup; and then unmounted the pen drive. Fairly beginner stuff but a time-and-effort-saver.
I was wondering if I could add to this script the capability to make a net backup-- invoke wvdial, fire up evolution; in evolution, mail to gmail; then close evolution; then close wvdial (I use Rel. Netconnect, so wvdial); and write me a logfile which I could check.
No need to fire evolution. Install attachmail a perl script to send mail with attachments on the command line. set a cron job and set bios to autostart at 3am. and shutdown after completion, while you party.