Back up Data
The Data Backups script backs up integration data stored in the /var/pricefx/data directory. It replaces the IM Backup route which was slow (so set integration.backup.enabled
to false
).Â
How It Works
The script scans the /var/pricefx/data directory. This directory has sub-directories with partitions (customers) and sub-sub-directories with interfaces, e.g.:
data
customerA
interface1
interface2
The output directory is /var/pricefx/data-archive:
data-archive
customerA
messages-180101.tgz
messages-180102.tgz
events-180101.tgz
events-180102.tgz
The script preserves the files for 365 days (which is configurable).Â
The script stores files older than 3 days. New files stay in the directories.
 | File | Note |
---|---|---|
script | /var/pricefx/bin/pricefx-backup-integration-data.sh | Backups of 3 day old files. |
cron | /etc/cron.d/pricefx-backup-integration-data | Runs every day at 3 am. |
input | /var/price/data/${partitions} | Scans all partitions and its subdirectories (interface). |
output | /var/price/data-archive/${partitions} | Contains /${partition}/ and all interface backups. |
How to Set It Up
Copy the backup script /var/pricefx/bin/pricefx-backup-integration-data.sh from int1.us-vh.pricefx.net to the same location on your server.Â
Set up the cron job by adding a file /etc/cron.d/pricefx-backup-integration-data with the following content:Â
0 3 ***** /var/pricefx/bin/pricefx-backup-integration-data.sh –d 3
Where It Is Applied
Server | Applied |
---|---|
yes | |
yes | |
yes | |
yes | |
yes | |
yes | |
yes | |
node1.cox.pricefx.net | yes |
node1.irm-qa.pricefx.net | yes |
node1.irm.pricefx.net | yes |
Planned Development
Read configuration for each ${partition} from IM where the user can specify time to preserve files etc.
IntegrationManager version 5.8.0