Creating Multiple Post Office Backups Within a Day (Intra-day Backups)

  • 7019426
  • 07-May-2008
  • 30-Aug-2017

Environment


Reload (all versions

Situation


Reload only runs one backup per day; however, what if a server crashed in the middle of the day?  All of the mail sent/received since the nightly backup would be lost.

How can an organization minimize its exposure to risk?  Is there a way to run more than one backup per day in Reload?

Resolution


Only one backup per day can be configured within the Reload administration console; however, you can leverage the functionality of the Linux cron system to run multiple backups per day.  We call these "intra-day" backups.

 

Setting Up Cron Jobs

Utilize the Reload "Run Job Creation Utility" (reloadj) in conjunction with the Linux cron utility to make the intra-day backupsIn this example, we'll set up 4 jobs to run during the day before the standard nightly job runs (as configured within Reload).

1.  Edit the crontab file in /etc directory.

2.  Add the following four lines:

0 6 * * 1-5      root   /usr/sbin/reloadj -p poedu -i
0 9 * * 1-5      root   /usr/sbin/reloadj -p poedu -i
0 12 * * 1-5    root   /usr/sbin/reloadj -p poedu -i
0 15 * * 1-5    root   /usr/sbin/reloadj -p poedu -i

3.  Restart the cron daemon:  /etc/init.d/cron restart

These backups run without SmartPurge enable; however, the nightly job configured within Reload will perform the SmartPurge operation on the post office.


What This Does

1. The backup at 6:00 A.M. creates the first backup of the day. However it does not run the Reload SmartPurge Agent. Because of this, a backup is created, but users are not able to purge mail that was backed up from the 6:00 A.M. Job.

2. The backup at 9:00 A.M. creates the second backup of the day. However it does not run the Reload SmartPurge Agent. Because of this a backup is created, but users are not able to purge mail that was backed up from the 9:00 A.M. Job. When the 9:00 A.M. Job finishes, it encounters the backup set from 6:00 A.M.. The 9:00 A.M. Job is guaranteed to have everything within it that the 6:00 A.M. Job had, so Reload discards of the 6:00 A.M. Job.

3. The backup at 12:00 P.M. creates the third backup of the day. However it does not run the Reload SmartPurge Agent. Because of this, a backup is created, but users are not able to purge mail that was backed up from the 12:00 P.M. Job. When the 12:00 P.M. Job finishes, it encounters the backup set from 9:00 A.M.. The 12:00 P.M. Job is guaranteed to have everything within it that the 9:00 A.M. Job had. So Reload discards of the 9:00 A.M. Job.

4. The backup at 3:00 P.M. (15:00) creates the fourth backup of the day. However it does not run the Reload SmartPurge Agent. Because of this, a backup is created, but users are not able to purge mail that was backed up from the 3:00 P.M. (15:00) Job. When the 3:00 P.M. (15:00) Job finishes, it encounters the backup set from 12:00 P.M.. The 3:00 P.M. (15:00) Job is guaranteed to have everything within it that the 12:00 P.M. Job had. So Reload discards of the 12:00 P.M. Job.

5. The backup at 7:30 P.M. (19:30) creates the fifth backup of the day. And the Reload SmartPurge Agent does run. Because the Reload SmartPurge Agent ran on the final backup, items that are received prior to 7:30 P.M. (19:30) are purgeable from post office. When the 7:30 P.M. (19:30) Job finishes, it encounters the backup set from 3:00 P.M. (15:00). The 7:30 P.M. (19:30) Job is guaranteed to have everything within it that the 3:00 P.M. (15:00) Job had, so Reload discards of the 3:00 P.M. (15:00) Job.


Further Reading:  Refer to the Reload manual on our support website or the documentation on the Reload server and search for crontab.


Crontab Summary


Minute (0-59)

Hour

(0-23)

Day

(1-31)

Month

(1-12)

Weekday

(0-6)

0=Sun


User

Command

*

*

*

*

*

<run as user>”

<command to run>



EXAMPLE #1:   Run reloadh as the root user every minute without end


*/1 * * * *     root /usr/sbin/reloadh  


Minute (0-59)

Hour

(0-23)

Day

(1-31)

Month

(1-12)

Weekday

(0-6)

0=Sun


User

Command

*/1

*

*

*

*

root

/usr/sbin/reloadh


NOTE:  “/” before the number says to repeat every x number (e.g., */1 * * * * says to repeat the command every minute; otherwise - without the “/” - it would issue the command on the first minute.



EXAMPLE #2:   Run reloadj on PO profile “po1” without SmartPurge enabled.

Run on the 6th, 9th, 12th, and 15th hour on Mon (1) through Fri (5).


0 6 * * 1-5 root   /usr/sbin/reloadj -p po1 -i

0 9 * * 1-5 root   /usr/sbin/reloadj -p po1 -i

0 12 * * 1-5 root   /usr/sbin/reloadj -p po1 -i

0 15 * * 1-5 root   /usr/sbin/reloadj -p po1 -i


Minute (0-59)

Hour

(0-23)

Day

(1-31)

Month

(1-12)

Weekday

(0-6)

0=Sun


User

Command

0

6

*

*

1-5

root

/user/sbin/reloadj -p po1 -i

0

9

*

*

1-5

root

/user/sbin/reloadj -p po1 -i

0

12

*

*

1-5

root

/user/sbin/reloadj -p po1 -i

0

15

*

*

1-5

root

/user/sbin/reloadj -p po1 -i


For additional help on modifying a crontab file, consider searching for “linux crontab” at http://www.google.com.

 

Additional Information

This article was originally published in the GWAVA knowledgebase as article ID 239.