File System Maintenance
This option allows you to:
- Clean various directories of the SFX server
- Check for local files and broken symbolic links
- Copy local files from one SFX instance to another
To access this option, select option 2 File System Maintenance from the main menu. The Filesystem Maintenance menu is displayed:
|
Filesystem Maintenance 1 Clean /exlibris/sfx_ver/sfx4_1/tmp/ (only by sfxglb41) 2 Clean Apache log 3 Clean Mysql log 4 Clean /exlibris/sfx_ver/sfx4_1/sfxglb41/logs/ 5 Clean /exlibris/sfx_ver/sfx4_1/sfxglb41/dbs/scratch/ 6 Clean /exlibris/sfx_ver/sfx4_1/sfxglb41/export 7 Check for broken symbolic links (except for sfxglb41) 8 Check for local files 9 Check for orphan links and remove them 10 Copy files from one instance to another 11 Scheduling file system maintenance tasks |
Clean /exlibris/sfx_ver/sfx4_1/tmp/
This directory contains a number of files and subdirectories with files that are generated during various maintenance tasks in the SFX system. It is recommended to clean this directory regularly. Note that this option can only be run as the sfxglb41 user.
The following subdirectory exists under /exlibris/sfx_ver/sfx4_1/tmp/:
/exlibris/sfx_ver/sfx4_1/tmp/backup
This directory contains the backups of all sfxglb41 files and all instance databases that were made before each revision update.
When removing files from this directory, we recommend keeping at least the last two or three backups.
When running the option to clean the tmp directory, the backup subdirectory is not cleaned automatically. Instead, the user is prompted for the deletion of each backup file, regardless of whether the option to prompt for the removal of each file is chosen.
To run this option, select 4 Clean /exlibris/sfx_ver/sfx4_1/sfxglb41/logs/. The following is displayed:
|
Prompt for removal of each file? [Y/n] |
Type Y to be prompted before the removal of each file. Type N if this is not required. The following is displayed:
|
Files in tmp are: <list of files> Would you like to only delete files older than a specific date? [Y/n] |
Type Y to define a date and remove files older than this date. Enter the date in YYYYMMDD format. Type N to remove all the files in the directory.
If backups are found in the tmp/backup directory, you are prompted for the removal of each of the backup files. For example:
|
Are you sure you want to delete '/exlibris/sfx_ver/sfx4_1/tmp/backup/2011-09-19_12.04-Automatic_pre-revision_backup.tgz' it's one of two latest revision backup files? [y/N] n |
At the end of the process, the following is displayed:
|
Removed 58 files See /exlibris/sfx_ver/sfx4_1/sfxglb41/logs/server_admin_util.log for details |
For more information about backups performed during the revision update, refer to the SFX Knowledgebase Update section of the SFX Advanced User's Guide.
Clean Apache and MySQL Logs
The Apache and MySQL logs contain messages produced from the Apache and MySQL servers. When these log files become too large, use this option to clean them.
- Cleaning the Apache logs requires restarting the Apache server (you need the UNIX password of the sfxglb41 user).
- By default, cleaning the MySQL logs requires the MySQL root password and UNIX password of the sfxglb41 user. By default, MySQL binary logging is not enabled in version 4. Only use this option if you have enabled binary logging. For information on enabling binary logging, see Enabling Binary Logging and Recovering Binary Logs.
Clean /exlibris/sfx_ver/sfx4_1/sfxlcl41/logs/
The logs directory contains log files related to the instance, such as RSI and A-Z build log files and Verde Publishing log files. When this option is run, SFX removes all log files, except for files created or updated that day (since midnight- server time).
To run this option, select option 4 Clean /exlibris/sfx_ver/sfx4_1/sfxglb41/logs/. The following is displayed:
|
Prompt for removal of each file? [Y/n] n |
Type Y to be prompted before the removal of each file. Type N if this is not needed. After removal of the log files, the following is displayed:
|
Removed 27 files See /exlibris/sfx_ver/sfx4_1/sfxglb41/logs/server_admin_util.log for details. |
Clean /exlibris/sfx_ver/sfx4_1/sfxlcl41/dbs/scratch/
This directory contains:
- Input files loaded using DataLoader
- Export files from the Export tool and the TargetMatcher tool
- Log files from the DataLoader, Export tool, and TargetMatcher tool
- Session files in the./dbs/scratch/sessions/directory
The following scenarios create new session files:
- Any logon to SFXAdmin.
- Each user accessing the A-Z List (Version ) creates a new session that stores information when the user moves between pages.
- The Ebsco Article Matcher Target Parser creates a session file when more then one URL is retrieved from Ebsco.
Removing session files that are currently in use logs off anyone working in SFXAdmin at that time. Old session files created can be safely removed. Note that completely removing the sessions/ directory causes SFXAdmin to stop working. The A-Z List and Ebsco Target Parser are not affected by this.
When running this option, SFX does not remove the session directory itself, and only removes session files older than one day. The following is displayed:
|
Prompt for removal of each file? [Y/n] Y |
Type Y to be prompted before the removal of each file. Type N if this is not required. The following is displayed:
|
Cleaning sessions... Cleaning scratch... Are you sure you want to delete '/exlibris/sfx_ver/sfx4_4/sfxglb41/dbs/scratch/dataloader01.txt'? [y/N] Y Are you sure you want to delete '/exlibris/sfx_ver/sfx4_4/sfxglb41/dbs/scratch/e-collection.20110920112148'? [y/N] Y Removed 2 files |
See /exlibris/sfx_ver/sfx4_4/sfxglb41/logs/server_admin_util.log for details.
Clean /exlibris/sfx_ver/sfx4_1/sfxglb41/export
This option allows you to select files to be removed from the export directory and to remove all files older than a specific date from the export directory. You are prompted with the following questions:
|
Prompt for removal of each file? [Y/n] Would you like to only delete files older than a specific date? [Y/n] |
Check for Broken Symbolic Links
This program reports which files in the local SFX instance have a broken symbolic link to the sfxglb41 instance.
If broken symbolic links are found, the program asks whether the broken links should be restored. If you select Y, for each broken link you are prompted to either restore the broken link or keep it as is. It is possible to make a backup copy of the broken link file before restoring the link to sfxglb41.
The program uses a configuration file that contains a list of files that exist in sfxglb41 but should not be symbolically linked to sfxglb41. The configuration file is: ./config/list_non_symlink.config_.
Note that this option cannot be run by the sfxglb41 user.
The following is an example of this option. (Bold text is typed by the user):
|
Check for broken symbolic links Please select [1-12,q,m]: 8 Do you want to save the output in a file? [y/N] y File location? /exlibris/sfx_ver/sfx4_1/sfxlcl41/out.txt List of files is at '/exlibris/sfx_ver/sfx4_1/sfxlcl41/out.txt'. Would you like to recreate broken symbolic link/s [y/N] y Would you like to backup the local file/s [Y/n] y Repair file /exlibris/sfx_ver/sfx4_1/sfxlcl41/templates/sfxmenu/target_list.tmpl ? [Y/n] y Broken link to /exlibris/sfx_ver/sfx4_1/sfxglb41/templates/sfxmenu/target_list.tmpl was repaired successfully Local file /exlibris/sfx_ver/sfx4_1/sfxlcl41/templates/sfxmenu/target_list.tmpl was backed up to /exlibris/sfx_ver/sfx4_1/sfxlcl41/templates/sfxmenu/target_list.tmpl.bak.20080617 |
Check for Local Files
This program reports files in an SFX instance that are local (not symbolically linked to sfxglb41).
The following is an example of this option. (Bold text is typed by the user):
|
10 Check for local files Please select [1-12,q,m]: 9 Search for local files in '/exlibris/sfx_ver/sfx4_1/sfxlcl41' Do you want to save the output in a file? [y/N] y File location? /exlibris/sfx_ver/sfx4_1/sfxlcl41/out.txt List of files is at '/exlibris/sfx_ver/sfx4_1/sfxlcl41/out.txt'. |
Check for Orphan Links and Remove Them
This option removes symbolic links pointing to non-existent files.
The following is an example of this option. (Bold text is typed by the user):
|
10 Check for orphan links and remove them Please select [1-12,q,m]: 10 Removing orphaned symbolic links at /exlibris/sfx_ver/sfx4_1/sfxlcl41. Removed '/exlibris/sfx_ver/sfx4_1/sfxlcl41/dbs/scratch/test41.txt'. |
Copy Files from One Instance to Another
This option copies files, directories, and symbolic links from the origin to the destination instance. Files listed in the configuration file cannot be copied. The configuration file is: ./config/avoid_copying.config.
The following is an example of this option. (Bold text is typed by the user):
|
12 Copy files from one instance to another Please select [1-12,q,m]: 11 Origin instance? sfxlcl41 Destination instance? sfxtst41 Log stored in '/exlibris/sfx_ver/sfx4_1/sfxtst41/logs/copy_instance_files.log'. |
Scheduling File System Maintenance Tasks
This option allows you to schedule file system maintenance tasks. Select 11 Scheduling File System Maintenance Tasks from the main menu. The following is displayed:
|
Scheduling file system maintenance tasks 1 List scheduled tasks 2 Schedule cleaning /exlibris/sfx_ver/sfx4_1/sfxlcl41/logs/ 3 Schedule cleaning /exlibris/sfx_ver/sfx4_1/sfxlcl41/dbs/scratch/ 4 Schedule cleaning /exlibris/sfx_ver/sfx4_1/sfxlcl41/export 5 Scheduling cleaning /exlibris/sfx_ver/sfx4_1/tmp/ (only by sfxglb41) 6 Schedule cleaning mysql logs (only by sfxglb41) |
For each cleaning option there is a specific time-frame for which old files are deleted. Refer to the following table:
| Directory | Time-Frame |
|---|---|
| scratch/sessions' | 2 days |
| scratch/e_collection_update | 14 days |
| dbs/scratch | 7 days |
| tmp/ and tmp/backup | 3 months |
| logs | 1 month |
| export/ | 1 month |
The following is an example of the config/server_maintenance_tasks.config_ file with the default settings:
|
Section "cleanup" clean_sessions_dir "2 days" clean_scratch_e_collection_dir "14 days" clean_scratch_dir "7 days" clean_tmp_dir "3 months" clean_logs_dir "1 month" clean_export_dir "1 month" EndSection |
To see a list of scheduled tasks or to delete a task, select 1 List scheduled tasks. The following is displayed:
|
File system maintenance schedule is as follows: [1] clean_logs 22:00 of every day of every month [2] clean_scratch 00:00 of every Monday of every month [3] clean_mysql_logs 22:00 of every day of every month [4] clean_tmp 00:00 of every Monday of every month [5] clean_export 00:00 of every Monday of every month Would you like to remove any of these? [y/N] Y Please enter the number of the task to remove or <enter> to cancel: 2 Successfully deleted the crontab line |