Advertisement

04.22.2008 at 02:53PM PDT, ID: 23344765
[x]
Attachment Details

Automated backup using cron...

Asked by aej1973 in Linux Administration

Tags: Red Hat Linux, ES4

Hi, I have a backup ftp script  that I run to backup a database and then ftp the tar file to a backup server. I need to automate this process and I have set up a cron task. I have added the following file in the cron.d
directory.

15     18    *     *   0-6            ~/backup.sh

I need to take a  backup from  Mon - Sat at 6.15 in the eveving. The scrip that need to run is backup.sh that is in the root directory. This does not seem to work. The backup.sh scrit works, but the automatic back up does not seem to be working.What could be the issue. The backup.sh script is attached.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
#!/bin/sh
cd /usr/local/mysql/data
 
tar -cvf win_backup_$(date +%b%d).tar ./win
mv win_backup_$(date +%b%d).tar /dbdata/apr_2008
###### FTP connections ######
echo now connecting to the ftp server...
USER="anonymous"
PASSWD="anonymous"
YES="y"
ftp -n -v 192.168.1.123 << EOF
user $USER $PASSWD $YES
mput /dbdata/apr_2008/win_backup_$(date +%b%d).tar
bye
[+][-]04.22.2008 at 03:08PM PDT, ID: 21416029

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 03:09PM PDT, ID: 21416032

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.22.2008 at 03:29PM PDT, ID: 21416181

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 03:31PM PDT, ID: 21416195

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux Administration
Tags: Red Hat Linux, ES4
Sign Up Now!
Solution Provided By: shakoush2001
Participating Experts: 4
Solution Grade: A
 
 
[+][-]04.22.2008 at 09:46PM PDT, ID: 21417835

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 10:13PM PDT, ID: 21417903

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 12:00AM PDT, ID: 21418276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 12:33AM PDT, ID: 21418400

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 12:39AM PDT, ID: 21418415

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 09:01AM PDT, ID: 21432341

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628