Labeling streamer tapes can be quite a challenge. Unreadable Post-It notes or handwritten labels on the sticker of a tape are unpractical and unsatisfying. Here we present you with a solution for SEP sesam that's laid out for small and medium sized businesses. Usually in KMU environments a streamer tape is inserted daily on which the backup is stored. The tape is then taken out and archived after the Newday event. A small label printer is needed.
Most companies have thermotransfer printers that can create labels or similar things. A popular printer is the Intermec EasyCoder C4, Homepage: http://www.intermec.com/products/prtrpc4/index.aspx . It uses 50 * 26 mm labels. SEP sesam can e configured to automatically print a label with the backup day, date, backup state and tape name at the Newday. Failed backups are highlighted with an inverted label. The Linux shell script wh_print was created specifically to control the C4 printer. This script is called up by sm_notify at the Newday (ALL_JOBS_DONE). The script wh_print evaluates the given parameter and the daily protocol, creates a print file in /tmp and sends this print file to the printer with netcat.
Templates for sm_notiry and wh_print are available at http://download.sep.de/utils/Label-templates/
Contents |
1. Copy the script wh_print into <SESAM ROOT>/opt/sesam/bin/sesam.
2. Make wh_print executable with chmod 755 wh_print.
3. Edit sm_notify and enter the following code after the term send_mail():
4. Further down under case $1 in field enter the following line under ALL_JOBS_DONE:
print_label "$2";. A template of sm_notify is included in the ZIP archive.
5. Edit the wh_print script and enter the printer's IP address (PRINTER=).
The sesam Newday should occur between 6 a.m. and 8 a.m., i.e. in the morning, and the tape is ejected at the Newday (in sm_notify under ALL_JOBS_DONE with unload_tape 2;). This script prints a label specifically for the tape that's ejected at the Newday. This was tested with SEP sesam 3.4.1.41, Linux under Open SusE 10.2, Intermec EasyCoder C4 203DPI, 50 * 26 mm labels.
To test this you can either execute the wh_print script with a parameter or sm_notify with two parameters. Both options are shown here. Please note that a successful backup has to be created beforehand. Otherwise the daily protocol would be empty and no tape name could be printed onto the label.
wh_print 31 backups completed with 2 broken, 2 failed, 6 with warnings and 21 successful.
test wh_print with OK message:
wh_print All 2 backups completed successfully.
sm_notify ALL_JOBS_DONE 31 backups completed with 2 broken, 2 failed, 6 with warnings and 21 successful.
test sm_notify with OK message:
sm_notify ALL_JOBS_DONE All 2 backups completed successfully.
A label must be printed for every case. If the tape name is missing then no successful backup was done beforehand.
Since this is a shell script adjusting it to other label formats is easy. Adjustment to other printers that print character oriented should also be simple. Controlling printers that need a graphics data stream with a shell script is very difficult.
We noticed that in some cases no label is printed if single jobs are canceled.
Free, We are not liable for damages, use at your own risk.
© 2008 by Walter Hofstädtler Hofstädtler I.E. GmbH A-2700 Wr. Neustadt
Our sales team would be happy to assist you!
Browse and discover videos by SEP.