5.3.3 Backup of S-file data base

The program collects all S-files in a given time interval for a given data base and optionally compresses the output file. The input is only from the prompt:

options: -start_time: time to start yyymmddhhmmss, at least yyyy,

                        if not given, use 1900

           -end_time  : time to end, if not given, use current time

           -base_name : data base, if not given use default data base

           -out       : directory ending with / where files are written

                        if not given, working directory is used

           -compress  : name of compress program, if blank no compression

If using all defults, the program will collect all data in the default data base from 1900 to the current date and write a file with a name like

backup-sfiles.TEST_.20230630090515

The program can be operated manually. However, it is intended to be used with a cron job to automatically backup an S-file data base. In COM, there is an example script to be used for a cron job, e.g.

#!/bin/csh 
# 
#  directory where backup_sfiles is running and backup 
#  files are written by default 
# 
cd /home/seismo/backup_sfiles 
# 
#   define env variables 
# 
source /home/seismo/COM/SEISAN.csh 
# 
#  start backup_sfiles 
# 
/home/seismo/PRO/backup_sfiles -start_time 200201 -base_name ISC  >/dev/null 
# 
#  all in default data base compressed 
# 
#/home/seismo/PRO/backup_sfiles -compress gzip   >/dev/null 
# 
#