WCCOAtoolMedia

This description is intended to further explain the backup processes only.

WCCOAtoolMedia is used to back up files to any media (DAT, HD). It is controlled through an input file and returns messages in an output file. The tool is usually started automatically, for example, in the online mode.

CAUTION: When restoring backed up files under Linux using WCCOAtoolMedia, the file access right of the restored files are changed. This is on purpose as customers had problems accessing these files from different user accounts. To change this behavior, open WCCOAtoolMedia in wincc_oa_path/bin and remove or comment out (#) lines 511 and 518: chmod -R u+rw,g+rw,o+r,a+X ${DN}

Call

WCCOAtoolMedia has two parameters:

WCCOAtoolMedia.exe inputfile outputfile

WCCOAtoolMedia

  • inputfile: Input file with absolute path
  • outputfile: Output file with absolute path

The input file contains the action that has to be performed and the output file contains error messages if any errors occurred during execution.

Example

.exe c:/tmp/input.txt c:/tmp/output.txt

Structure of the input file

  • COMMAND
  • DEVICE
  • FILE SYSTEM
  • COMPRESSION
  • [FILE LIST]

The first four entries must always be present. The file list is only required for swapping in and out.

Command

Defines the action to be performed. Possible actions are:

  • init: Initialization of the archival medium. With DAT tapes, the tape is deleted, with file-oriented backup media, the medium is only checked.
  • rewind: Rewinds the tape with DAT bands.
  • eject: Ejects DAT tapes.
  • dir: Writes the contents of the backup medium to the output file.
  • status: Writes the contents of the backup medium to the output file, extended information.
  • backup: Moves the files specified in the FILE LIST to the backup medium (to DEVICE).
  • restore: Restores the files specified in the FILE LIST (from DEVICE).

Device

The backup medium, for example,

B. /tape0, c:/backup/, z:/

CAUTION:

Paths must always be closed with a "/" or "\". This also applies to entries in the FILE LIST.

Filesystem

Defines the file system of the target medium:

  • FILE: File-oriented media (HD, ZIP, ...)
  • DAT: DAT tapes

Compression

Not yet used (used for activating and deactivating compression on the target medium).

File list

The files to be backed up or restored are specified in the file list.

Structure of the file list:

The file names in the file list may contain "?" and "*" as wild cards, but not the paths. If other directories that match the wild cards filter are found in a directory, they are not taken into consideration. Backup is therefore only carried out from one level.

The files in the file list can be specified with either relative or absolute paths. A directory to which the relative path refers must proceed a relative path.

Example

Absolute path:

C:/Siemens/Automation/WinCC_OA/3.10/db/db_file1.db

Relative path:

C:/Program Files/ETM/

Specification of a directory to which all the following entries refer to (the entry must end in / or /).

Difference between the two methods:

  • On the target medium, files are only identified by their file name if they were specified in the file list with their absolute path (db_file1.db).
  • If, however, they were specified with their relative path, they are identified on the backup medium with the relative path and file name (db/db_file_file2.db, db/db_file_file3.db).
CAUTION:

The behavior for backup and restore is different. During backup, the files to be backed up to DEVICE are listed in the FILE LIST. With restore, the target files to be restored from DEVICE are listed in the FILE LIST.

Structure of output file

The output file always has at least one entry, the MASTERERROR. If this value is not equal to 0, the output file may contain further entries that describe the problem in more detail (for example, what files to be backed up could not be opened for reading). The error messages are collated for the user from the error codes.

Examples

Input file:

Backup

/tape0

DAT

false

d:/tmp/tape0/test1.txt

d:/tmp/tape1/?test1.txt

d:/tmp/tape1/?test?.txt

d:/tmp/

tape0/*.*

tape0/test2.txt

tape0/test?.txt

tape1/a*.txt

Under the assumption that d:/tmp/tape0/ saves the files test1.txt, test2.txt and test3.txt and d:/tmp/tape1/ saves the files atest1.txt, atest2.txt, btest1.txt and btest2.txt, the following files are backed up to tape:

test1.txt from d:/tmp/tape0/

atest1.txt fromd:/tmp/tape1/

btest1.txt from d:/tmp/tape1/

atest1.txt from d:/tmp/tape1/

atest2.txt from d:/tmp/tape1/

btest1.txt from d:/tmp/tape1/

btest2.txt from d:/tmp/tape1/

tape0/test1.txt

tape0/test2.txt

tape0/test3.txt

tape0/test2.txt

tape0/test1.txt

tape0/test2.txt

tape0/test3.txt

tape1/atest1.txt

tape1/atest2.txt

This backup is now restored with the following input file:

Restore

/tape0

DAT

false

d:/tmp_rest/atest1.txt

d:/tmp_rest/btest?.txt

d:/tmp_rest/

tape0/*.*

First the files atest1.txt, btest1.txt, btest2.txt, tape0/test1.txt, tape0/test2.txt, tape0/test3.txt, are searched for on /tape0 and then restored to d:/tmp_rest/, which results in the following structure on the target:

d:/tmp_rest/atest1.txt

btest1.txt

btest2.txt

d:/tmp_rest/tape0/test1.txt

d:/tmp_rest/tape0/test2.txt

d:/tmp_rest/tape0/test3.txt