"I Need Simple Backup SH Script"
Hi friends, search backup sh script thread in programming, but I cant find as I want.Please help me.
I want to simple script. 1-.tar selected folder (/ , /home etc.) 2-copy network drive (samba or nfs) 3-Send succes or fail mail. Thanks in advance. PS:for Redhat. |
Welcome to LQ
Did you tried google? http://thewaystation.com/techref/unix/backups.shtml http://www.google.be/search?hl=en&cl...=&oq=&gs_rfai= |
Quote:
But I need example script for only in 1-2-3.Do you help me? |
Example scripts which do each of the 3 items you indicate, should be plentiful around the internet, and surely there are some examples right here on LQ, just a SEARCH away.. If you find some and edit them to suit your exact situation, or write your own, and it does not work as expected, please show us the scripts and paste verbatim any errors produced and/or describe the problem in detail, and we will try to help you fix the problems. Probably not many people are willing to write you your scripts, or do your searching for you.
Cheers! |
At its simplest, a script is just a sequence of shell commands entered in a file. Give the file execute permissions and take off.
So, get the syntax for your tar commands, your copy commands, an email command, and put them in file. Test each by hand first. That makes your script. If you put the script in cron, and it generates errors, you automatically get those by email. So, you might not even need the email part. Ask questions on details if necessary. All part of learning Linux. |
Hi again,
I was modified this bash script.It's perfect works.But I don't know, how to send mail when finished?I'm using qmail.( mail to: ?, mail -s ? or ?) |
Quote:
|
hmm, mail -s command does not works to qmail..
I was created mail.sh and I wrote the following; ------------------------ telnet localhost 25 ehlo mail from:a@host.com rcpt to:b@client.com data backup success . quit ------------------------- this is nice idea :) but now problem is data integrity..! How do we do ? |
Quote:
Read section 2.8.3 of the Life with qmail guide. |
anomie, thanks for reply.
I was read life with qmail 1 weeks ago, but I can't find anything.. By the way, I solved the problem by installing Acronis. |
All times are GMT -5. The time now is 04:00 PM. |