ArGest Backup User Guide

  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Terminal Archive Creation: The Backup Function
  5. Date Formats for Use with (-n)

Date Formats for Use with (-n)

The date may be specified in one of four ways:

Format 1:

The variables in the first format have the following meanings:
DD – The day of the month.
MMM – The first three characters of the name of the month
YY – The last two digits of the current year
HH – The hour in 24 hour format
MM – The minute
SS – Seconds

The first format takes the following form:

-n DD-MMM-YY[,HH:MM:SS][,amc]

For example,

-n 07-dec-92,01:00

schedules a backup for 1:00 a.m. on December 7th, 1992. The three-letter month parameter is case insensitive. It could just as well have been written DEC or Dec. The seconds may be omitted. As indicated by the square brackets, the entire time specification is optional. If present, it is separated from the date specification by a single comma (,). If no time is specified, the default value, 00:00:00, is used.

There are three optional date types:

a – Access time. Access time can be set by the touch command. The list command ls -lu shows the access time.

m – Modification time. Modification time is shown by the ls -l command. The modification time can also be set by the touch command.

c – Inode change time, sometimes mistakenly referred to as “create” time but also known as status change time. Modifying a file, changing permissions, or moving a file will change this time. The time is shown by ls -lc. The status change time is set by the system. This time cannot be set by any user programs.

Format 2:

The following is a second format. All components are specified numerically.

-n MM/DD/YY[,HH:MM:SS]

Format 3:

A third format may also be used to specify the date following the -n:

-n MMDDHHMM[YY]

In this case, the month is specified numerically (MM) and must include a leading zero for one-digit months (for example, January must be entered as 01, not as 1). Note that there are two MM fields. The first is the month, the second is the year. If the year is not specified, BRU defaults to the current year.

Here is an example that schedules a backup for February 17th, 1993 at 1:30 a.m.:

-n 0217013093

Format 4:

The fourth option tells BRU to look for a specific file and use its modification date as the argument to -n.

-n pathname

You can use this option to create a script that will automatically create an archive for the appropriate time interval. Thus the file name you specify may be nothing more than a dummy file whose sole purpose is to provide a pathname whose modification time is controllable. NOTE: The -n option can also be used when retrieving files from an archive, that is, when using the -x mode. In this case, it tells BRU to extract only files that are newer than the date specified. See Chapter 7, “Extracting Files,” “Selecting Files by Date: -n,” for sample command lines.