📄 programs
字号:
Programs of AF's backup system==============================Programs of the server side--------------------------- $BASEDIR/server/bin/cartis Administration of the cartridge numbers. Usage: cartis <number> cartis -i <ins-cart> <ins-file> [ -S <cartset> ] The first form of this command is used to give the backup server a hint, which cartridge number is currently placed inside the streamer. If the tape has a valid afbackup label, then it is not necessary to tell the server, what tape is in the drive, cause it will try to read and evaluate it. If the tape is not labeled (e.g. if it has not been used before), the server has no chance to find out the number and must maintain it's own information about it. The server will automatically label new tapes, if they don't already have a valid label, the next time, a write operation is attempted on the tape. By issuing cartis after inserting an unlabeled tape you tell the server, what tape it should become. If you are not initially starting with cartridge number 1 and an unlabeled tape, you have to enter this command at least one time. (see: README, "BEFORE YOU START") if you have not labeled a tape or variable append mode is on. The second form instructs the server to write the next backup data stream to cartridge number <ins-cart>, starting at file number <ins-file>. This is useful, if for some reason you want to take the cartridge currently lying inside the drive out and continue on a different tape or at the beginning of the tape you have put in instead. Note, that it usually causes problems, if you try to write at a tape position, that is not at the end of the last file, that has been written to tape. So set the <ins-file> number only to a value different from 1, if you really know, that this is the end of the used tape area. In other words, if n files are on tape, set <ins-file> to n+1. So if you don't know n, you're better off starting to write at the beginning of a new tape entering the appropriate cartis-command. To find out, what the server is thinking, which cartridge is currently inside the drive, you can give the command $BASEDIR/client/bin/afclient -q on any client. If the value, that is printed out, does not reflect the reality, you have to inform the backup server about this fact via this command entering both forms of this command. The first form with the real cartridge number and the second one with the next cartridge number and a 1 as file number. Then the next backup goes to the next cartridge. You may also set the next backup writing position to the current file number on the correct cartridge. To find out, where the server side intents to write the next backup, enter the command $BASEDIR/client/bin/afclient -Q on any client. It makes sense to check the consistency from time to time, if the backup server has the right idea of the current cartridge. -S <cartset> The cartridge set to use, where <cartset> is the number of a valid cartridge set on the server side. Default is 1 $BASEDIR/server/bin/cartready (No arguments evaluated) If you have no cartridge handling system, a human must put the next cartridge into the drive, if necessary. Then the backup- server must get a hint, when the maintainer has done it. This is achieved entering this command on the backup server host, after the new cartridge is inserted. Nonetheless the server process waits a certain timespan, until it accesses the drive the next time (See: "Cart-Insert-Gracetime" in CONFIG). $BASEDIR/server/bin/label_tape Write a label to tape or display it. Usage: label_tape <label-number> [ -rfF ] [ -c <configfile> ] \ [ -S <sec-label-number ] [ -n <comment> ] \ [ -d <devicename> ] [ -b <blocksize> ] \ [ -s <set-file-cmd> ] [ -C <num-cartridges> ] label_tape -q [ -c <configfile> ] [ -d <devicename> ] \ [ -b <blocksize> ] [ -s <set-file-cmd> ] The first form writes a label to the tape, the second form shows the label on the tape, that is currently loaded. The tape-label must be an integer number. This number is written to the tape currently in the drive and identifies it uniquely. It must be in the range from 1 to the number of cartridges given in the configuration file. This label is written at the beginning of the tape, so all data on tape will be lost. Due to that fact the user is always prompted, if he really wants to do this. <config-file> can be a different configuration file than the one the server process is started with. Normally it makes no sense to use this option, but in extremely pathological cases the program might not be able to find out the full path to the configuration file. Then is has to be supplied at the command line. The normal case is to use this command without options, but the settings in the serverside configuration file can be overridden, if necessary. If it is intended to label a tape, while a server is waiting for another cartridge being put into the drive, the -F option must be used to override the lock, that is held by the server process. The server will be kept from probing, whether a tape is in the drive, while the label_tape program is running. label_tape should be started, before the tape to be labeled is put into the drive. Otherwise the server might eject it at once after probing. label_tape will prompt for confirmation before performing any tape access (if started without -f option). Thus the tape should be loaded after starting the command and before confirming. -b <blocksize> The blocksize of the device to use -C <num-carts> The total number of handled cartridges -c <configfile> A different configuration file to use -d <devicename> The device to use -f Force operation without further asking -F Continue regardless of a lock, probably set by other running applications, especially the server. This option may be used to label a tape, while the server is waiting for a cartridge to be put into the streamer device -n <comment> A comment to include into the tape label (256 characters max) -r Remove the cartridge in the drive from the cartridge handling database without further asking -S <sec-label> The secondary label number, the server will accept, if the primary label number does not match -s <setf-cmd> The command to reel the tape to a given file position $BASEDIR/server/bin/cart_ctl Perform operations on tapes: move, set location, inventory, list locations, label several tapes in changer slots, drives, loadbays cart_ctl [ -ilmtefFr ] [ -P [ <location> ] ] \ [ -s <serverconfigfile> ] \ [ -c <changerconfigfile> ] \ [ -d <changerdevice> ] [ -C <cartridges> ] \ [ -S [ <slots> ] ] [ -D [ <drives> ] ] \ [ -L [ <loadports> ] ] [ -b <blocksize> ] \ [ -n <comment> ] This command performs operations on cartridges and maintains the cartridge location database. This command is especially designed for moving cartridges around, serving as a wrapper for those commands, that in fact fulfil this functionality. cart_ctl adds the maintenance of the locations and unifies the command interface. E.g. the counting of slots, loadbays and drives always starts with 1 here. Several cartridges, slots, drives and loadbays can be supplied using numbers, dashes and commas to the respective option, e.g. -C 3-5,8 . The order is significant, e.g. -m -C 2-3,1 -S 5,4,3 will move cartridge 2 to slot 5, 3 to 4 and 1 to slot 3. This command evaluates the serverside configuration file and reads another file to configure the media changer driving commands. The path to this second configuration file must be given in the server configuration file as parameter Changer-Configuration-File See below under FILES for more details on this. With option -m, one or more cartridges are moved to another location. The location must be specified with options -S for slots, -D for drives, -L for loadbays and -P for a freetext description, if the cartridge is placed outside of any cartridge handling system. Thus the administrator can store any kind of text as reminder, where the tapes are. If there are no slots supplied with option -S, free slots are looked up and the cartridge(s) move there. The same applies for -L. If no drive is given with -D, the drive configured in the server configuration file is used. The number of the drive can be given, or the device name, but in the current version just -D is mostly suitable. If there is a tape in the drive, it will be unloaded to a free slot first. If occupied slots or loadbays are given as targets, an error message is printed and the move is not performed. If there is no argument given with -P, the user is prompted to enter a line of text, that is stored in the cartridge locations database. If several cartridges are moved outside of a robot, the text given with -P will be stored for all of them. If moving to loadbays is possible, moves to the outside will first have a loadport as target and the maintainer is asked to take the tape out of this place to it's final destination. When moving tapes in and there are loadbays, the maintainer is asked to put the cartridge into a loadbay and the robot does the rest. If there isn't yet any location stored for a cartridge, the maintainer is asked to perform the move manually, naming the origin location `unknown'. Option -S can be used, if a location of a tape changes, but it should not be moved by any robot. So -S just inserts or replaces the new location in the database. To specify the locations the same options can be used like when moving with -m, see the previous section for details. Option -l lists the locations of all cartridges. If -S is also supplied, the contents of the slots are listed. A dash means, that the slot is empty. A question mark means, that there is a cartridge in this slot, but it is unknown, which that might be. A dash, followed by a question mark and a number, all in braces, means, that the slot is empty, but the locations database has the given cartridge number stored for this slot, what means an inconsistency. Option -L together with -l has the respective meaning for loadbays like -S for slots. Option -i makes an inventory of the slots specified with -S. That is, the cartridges in these slots are loaded to drive, the labels are read and evaluated. If the label is recognized as valid for afbackup, the location database is updated. The cartridge will be put back to the original slot afterwards. Option -t can be used to label the tapes in several slots. The label numbers must be given using option -C and the slots with option -S. If the label numbers are not given, it is assumed, that the tapes should get the currently registered numbers. If it cannot be determined, which cartridges are in the given slots, this is an error. If the slots are not given, it is tried to determine them from the given cartridge numbers. If the given cartridges are currently not located in any slot, this is an error. Like with the command label_tape, a comment to be written to tape can be supplied with option -n. If option -r is not given, the user will be asked, whether the labeled cartridges should be marked overwritable. To achieve this without further asking the option -r must be given. Option -e makes the tape in the drive to be ejected to a free slot. No tape number has to be supplied. Optionally the slot can be specified using option -S. Options: -b override the blocksize setting in the server configuration file (discouraged) -C <cart> specify the cartridge numbers to operate on -c <file> use the given file to configure the media changer driving commands -D <drive> use the given drive as target for moves or location settings. The drive may be specified as number inside a changer system (starting with 1) or as device name. If no drive is given, the drive configured in the server configuration file is used -d <dev> operate on the given media changer device, don't use the settings in the configuration file -F force operations, ignore active locks on streamer and changer devices, if applicable
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -