Linux Server Setup Crontab Scheduled Backup
The previous system administrator left work hurriedly a month ago. Thus, I inherited a Red Hat Linux Enterprise server with little knowledge. There are many others who would be more apt at the task, but they refused the position. Colleagues consider it as something scary, which entails a big responsibility.
They might be right at some point. Imagine working with the ERP system of the whole institute which hosts Oracle Database and E-Business Suite financial module. Someone has to fill the gap immediately. So, I took the job.
The primary t to do is to have a good backup of the Linux Server. A complete backup could only be done during off office hours where nobody is using the system. Making a scheduled backup data backup is a first thing which needs to be done.
In Linux operating system the time-based job scheduler is known as cron. Crontab is a configuration file that contains shell commands to run on a given schedule. Setting up the crontab is easy with the following command:
$sudo crontab -e
It would prompt for a password then the default text editor will automatically open the crontab file.
Sample content of a crontab file:
59 02 * * sat sh /data/backup10g.sh
59 02 * * tue sh /data/backup10g.sh
59 02 * * wed sh /data/backup10g.sh
59 02 * * thu sh /data/backup10g.sh
59 02 * * fri sh /data/backup10g.sh
The above will run the shell script backup10g.sh which do data backup of the Oracle Database at 2:59 am at any day and any month of the year on particular days of the week.
Posted on
Saturday, February 6th, 2010 at 10:13 pm under 