Batchrun Team > Batch-Batchrun-1.03 > Batch::Batchrun::Retain

Download:
Batch-Batchrun-1.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 1.03   Source  

NAME ^

Retain - keep backup copies of a file

SYNOPSIS ^

use Batch::Batchrun::Retain;

retain(FILE=>test,LIMIT=>5,DIR=>/apps/irmprod/archive,COMPRESS=>yes,DELETE=>NO);

DESCRIPTION ^

The retain function provides a convenient way to keep backups of files. It keeps a determined number of files in numbered directories. Arguments are passed using named parameters. Each name is case insensitive. Of the several parameters only FILE and DIR are required.

REQUIRED PARAMETERS

FILE

the name of the file to retain

DIR

the name of the main directory. This is the directory where the numbered subdirectories will be created.

  EXAMPLE:  archive/
                   bk1/
                   bk2/

OPTIONAL PARAMETERS

COMPRESS

compress the backup copies of the file. True values are indicated by passing 1 or yes. (unix only - defaults to no)

CHMOD

the numeric mode to use when creating the backup file (defaults to 0775)

DELETE

deletes the original file if specified. True values are indicated by passing 1 or yes. (defaults to no)

LIMIT

number of backup copies to keep.

PREFIX

the prefix to use for each numbered directory. The numbered directory will automatically be created if it does not exist. (defaults to bk)

VERBOSE

show each file as it is moved or copied. (defaults to off)

NOTE: retain returns 1 or 0 to determine completion status.

TESTED PLATFORMS ^

Solaris 2.5.1, 2.6
WinNT 4.0

AUTHOR ^

Daryl Anderson <batchrun@pnl.gov>

REVISION ^

Current $VERSION is 1.03.

syntax highlighting: