Difference between revisions of "Seon Core administrative scripts"
(→seon_archive.sh) |
(→seon_archive.sh) |
||
(One intermediate revision by the same user not shown) | |||
Line 55: | Line 55: | ||
*is the parameter valid | *is the parameter valid | ||
− | Since the scripts locks the database tables which will be used for archiving, please plan a downtime for | + | Since the scripts locks the database tables which will be used for archiving, please plan a downtime for Seon. Also, please use the following procedure for using this script: |
− | #Shutdown | + | #Shutdown Seon processes |
#Shutdown webserver | #Shutdown webserver | ||
− | |||
#Run archive script | #Run archive script | ||
− | |||
#Start webserver | #Start webserver | ||
− | #Start | + | #Start Seon processes |
The created archive is a valid MySQL dump which can be easily imported with standard MySQL tools (like the "mysqlclient" command line tool). The archive is saved in the configured [[Seon_Core_installation#backup|database backup directory]] as a compressed MySQL dump file, with a filename | The created archive is a valid MySQL dump which can be easily imported with standard MySQL tools (like the "mysqlclient" command line tool). The archive is saved in the configured [[Seon_Core_installation#backup|database backup directory]] as a compressed MySQL dump file, with a filename |
Latest revision as of 13:23, 2 February 2016
daxware2seon
If you want to migrate from a Hüngsberg Daxware system to Seon, you can easily use this script to mass-import all partner entries to Seon. Just point the variable "PASSW_DAX
" to the appropriate file. Example:
PASSW_DAX=/tmp/passw.dax
The rest of the script works out-of-the-box if you have a configured Seon system running.
swan2seon.ksh
To mass-import partner entries from SWAN 1.5 database to Seon, the company SSC GmbH created this script which is free to use. You should run this script from a shell where the environment variable "SWAN_HOME
" is available. Also check the position of the Seon program "seonped
", which is being called in line 68 (also check the echo command on line 67).
seonbackup
This script works without parameters. It checks the configuration file and the backup directory (as given in the configuration panel). If all requirements are fulfilled, a SQL dump will be saved with a timestamp extension in the backup directory. The output of a sample run is:
hostname:/opt/seon/scripts # ./seonbackup backup file: /opt/seon/backup/seon.20050113.182639.sql
So you can re-use the output for further post-processes.
seonrestore
For restoring the Seon database, make sure all Seon processes are stopped. Also make sure the database is up and running. If you are not sure which file you want to restore, start the script without any parameter. It will say something like this:
hostname:/opt/seon/scripts # ./seonrestore no backup file as parameter 1 given. choose one of the existing: seon.20041015.205850.sql seon.20041222.175616.sql seon.20050113.182639.sql
These are the existing database dump files in the backup directory as configured in the configuration panel. If you are sure which file to restore, start the script with the filename as given above as the only parameter.
hostname:/opt/seon/scripts # ./seonrestore seon.20050113.182639.sql backup file: /opt/seon/backup/seon.20050113.182639.sql restored
Now you can safely start the Seon processes again.
seon_archive.sh
This script is intended to keep the MySQL database usage clean and usable. As a mandatory parameter, you must pass the maximum age of entries (in days) for the oldest entries available in the MySQL database. All entries older that this given age are archived. The archived entities are:
- all logs (incl. vault):
- receive log
- send log
- system log
- event (aka "script") log
- archived xERPs
- directory scanner
- CRL vault
- CSR vault
The script dynamically checks if Seon Enteprise is enabled. If this is the case, the script also archives the following entities older than the given age:
- all jobs
- all XML entries of archived jobs
- all plugin logs of archived jobs
The script dynamically verifies the running circumstances:
- is the database of type "MySQL"
- is a dump tool correctly configured
- is a backup directory correctly configured
- is the parameter valid
Since the scripts locks the database tables which will be used for archiving, please plan a downtime for Seon. Also, please use the following procedure for using this script:
- Shutdown Seon processes
- Shutdown webserver
- Run archive script
- Start webserver
- Start Seon processes
The created archive is a valid MySQL dump which can be easily imported with standard MySQL tools (like the "mysqlclient" command line tool). The archive is saved in the configured database backup directory as a compressed MySQL dump file, with a filename
seon_archive.$TIMESTAMP.sql.gz
where "$TIMESTAMP
" is a string containing the date- and timestamp when the script was started. Example:
/opt/seon/backup/seon_archive.20130813.121123.sql.gz
You can easily restore its content via the script "seonrestore" documented above.