Integration Backup (New)

The Data Backup script backs up integration data stored in the /var/pricefx/data and /home/customer/<customer>/filearea directories. 

How It Works

  • The script scans the /var/pricefx/integration/data and /home/customer/<customer>/filearea directories recursively.

  • If exclude list contains some paths, the backup script will not back up these folders and subfolders.

  • The output directory is /var/pricefx/integration/data-archive.

  • The script preserves the files in archive for 400 days.

  • The script stores files older than 30 days. Newer files stays in the directories untouched.

 

File

Note

 

File

Note

script

/home/ops/bin/integration_backup.sh

Backups of 40 days old files. 

cron

/etc/cron.d/integration_backup

Runs every day at 3 am.

input

/var/price/integration/data/
/home/customer/<customer>/filearea

Scans all directories and its subdirectories.
Backup folders are managed by salt.

exclude list

/home/ops/bin/integration_backup_exclude_list.txt

Contains folders which are excluded from backup, such as:
/home/customer/arm/filearea/DO_NOT_BACKUP_FOLDER/

If such file does not exist, than everything is backed up.

Exclude folders are managed by salt and can be fine grained per server.
Do not forget to add "/" at the end of the path.

Do not edit this file on the server. If you need to exclude some folder from backup, create a support ticket. Ops team will create salt pillars specially for this server. Example below.

output

/var/pricefx/integration/data-archive

Contains all archived files for date minus 400 days.

log

/var/log/integration/backup/integration_backup_YYYY-mm-DD_HH-MM-SS.log

Log file of executed integration_backup.sh.

How to Set It Up

Ask Ops team to apply salt state called "im.backup" against the desired server.

OR

Do it yourself:

salt-call state.apply im.backup

Where It Is Applied

Server

Applied

Note

Server

Applied

Note

node1.pry.pricefx.net

yes



node1.stahl-qa.pricefx.net

yes



node1.tktt-qa.pricefx.net

yes



node1.mgb-qa.pricefx.net

yes



int2.eu.pricefx.net

yes



int1.prima-qa.pricefx.net

yes



node1.michelin-amn.pricefx.net

yes



int1.ms-qa.pricefx.net

yes



int1.ipt.pricefx.net

yes



int1.ms-sim.pricefx.net

yes



node1.gev-qa.pricefx.net

yes



node1.essity.pricefx.net

yes



node1.em.pricefx.net

yes



node1.ttipt.pricefx.net

yes



node1.sig.pricefx.net

yes



node1.michelin-qa.pricefx.net

yes



int2.ms-qa.pricefx.net

yes



node1.seglobal-qa.pricefx.net

yes



node1.lyreco-qa.pricefx.net

yes



qa.pry.pricefx.net

yes



int3.eu.pricefx.net

yes



node1.lnz.pricefx.net

yes



stn-qa.pricefx.net

yes



node1.tata.pricefx.net

yes



node1.lyreco.pricefx.net

yes



node1.tesa-qa.pricefx.net

yes



node1.sae-qa.pricefx.net

yes



int1.eu.pricefx.net

yes



node1.lnz-qa.pricefx.net

yes



node1.shelub.pricefx.net

yes



node1.essity-qa.pricefx.net

yes



node1.seglobal.pricefx.net

yes



node1.mgb.pricefx.net

yes



node1.tesa.pricefx.net

yes



node2.ek.pricefx.net

yes



int2.ms-sim.pricefx.net

yes



node1.bhs.pricefx.net

yes



node1.sonocorpc-qa.pricefx.net

yes



frontend.stn.pricefx.net

yes



node1.conrad-qa.pricefx.net

yes



int1.ms-prod.pricefx.net

yes



node1.granit.pricefx.net

yes



ek-qa.pricefx.net

yes



int4.eu.pricefx.net

yes



pie-main.ms.pricefx.net

yes



node1.jc.pricefx.net

yes



node1.jc-qa.pricefx.net

yes



node1.kp.pricefx.net

yes



node1.draeger-qa.pricefx.net

yes



int1.danone.pricefx.net

yes



node1.tktt.pricefx.net

yes



node1.draeger.pricefx.net

yes



node1.metrie.pricefx.net

yes



node1.vrla.pricefx.net

yes



node1.vrla-qa.pricefx.net

yes



node1.anda-qa.pricefx.net

yes



node1.nvt.pricefx.net

yes



node1.greif.pricefx.net

yes



node1.watsco-qa.pricefx.net

yes



int1.us-vh.pricefx.net

yes



node1.icp-qa.pricefx.net

yes



node1.apr.pricefx.net

yes



node1.ttipt-qa.pricefx.net

yes



node1.oi.pricefx.net

yes



int1.ipt-qa.pricefx.net

yes



hybris.pricefx.net

yes



node1.sol.pricefx.net

yes



node1.smg-qa.pricefx.net

yes



node1.stahl.pricefx.net

yes



node1.smg.pricefx.net

yes



node1.sol-qa.pricefx.net

yes



node1.michelin-amn-qa.pricefx.net

yes



node1.tfg.pricefx.net

yes



node1.oerl.pricefx.net

yes



node1.dana-qa.pricefx.net

yes



int1.rs.pricefx.net

yes



node1.nci.pricefx.net

yes



node1.crt.pricefx.net

yes



node1.tc-qa.pricefx.net

yes



node1.arm.pricefx.net

yes



node1.oi-qa.pricefx.net

yes



node1.watsco.pricefx.net

yes



node1.cox.pricefx.net

yes



node1.mabe.pricefx.net

yes



node2.nci.pricefx.net

yes



node1.mabe-qa.pricefx.net

yes



node1.anda.pricefx.net

yes



node1.ascend-qa.pricefx.net

yes



node1.apr-qa.pricefx.net

yes



node1.irm-qa.pricefx.net

yes



node1.bain.pricefx.net

yes



node1.trane-qa.pricefx.net

yes



node1.oerl-qa.pricefx.net

yes



node1.arm-qa.pricefx.net

yes



int2.ms-prod.pricefx.net

yes



node1.icp.pricefx.net

yes



node1.se.pricefx.net

yes



node1.sonocorpc.pricefx.net

yes



node1.dana.pricefx.net

yes



node1.nvt-qa.pricefx.net

yes



node1.michelin.pricefx.net

yes



node1.p66-qa.pricefx.net

yes



node1.se-qa.pricefx.net

yes



node1.crt-qa.pricefx.net

yes



node1.irm.pricefx.net

yes



node1.dlph.pricefx.net

yes



node1.nci-qa.pricefx.net

yes



node1.coes-qa.pricefx.net

yes



node1.vai.pricefx.net

yes



node1.dlph-qa.pricefx.net

yes



node2.tc.pricefx.net

yes



node1.greif-qa.pricefx.net

yes



node1.ahlsell-qa.pricefx.net

yes



qa.vai.pricefx.net

yes



node1.coes.pricefx.net

yes



node1.tata-qa.pricefx.net

yes



int1.dean.pricefx.net

yes



node1.shelub-qa.pricefx.net

yes



node1.ascend.pricefx.net

yes



int1.ad.pricefx.net

yes



int1.prima.pricefx.net

yes



node1.cox-qa.pricefx.net

yes



node1.sae.pricefx.net

yes



int1.syd.pricefx.net

yes



node1.metrie-qa.pricefx.net

no

salt-agent is not responding - seems like entire server is in bad condition. Raid is broken etc. Jiri Kokosek is taking care of it.

Total: 125
Done: 124

Planned Development

Distribute the backup script over salt once per a period of time to be sure all IM servers are compliant with integration backup standard.

Examples

Definition of Backup Folders

We have a map and we want to back up customer and data folders.

BACKUP_FOLDERS=( ["customer"]="/home/customer" ["data"]="/var/pricefx/integration/data" )

Definition of Other Properties

ARCHIVE_FOLDER="/var/pricefx/integration/data-archive" EXCLUDE_LIST_LOCATION="/home/ops/bin" EXCLUDE_LIST_FILENAME="integration_backup_exclude_list.txt" RETENTION_FILES_CUSTOMER="30" RETENTION_FILES_DATA="10" RETENTION_ARCHIVE_FILES="400" ACTUAL_TIMESTAMP=$(date +%F_%H-%M-%S) LOG_FILE_FOLDER="/var/log/integration/backup" LOG_FILE="$LOG_FILE_FOLDER/integration_backup_$ACTUAL_TIMESTAMP.log" #prefix will be compound from backup folders key + customer(subfolder) + subsubfolders INTEGRATION_BACKUP_FILE_SUFFIX="integration_backup_$ACTUAL_TIMESTAMP.tar.gz"

RETENTION_FILES_CUSTOMER, RETENTION_FILES_DATA and RETENTION_ARCHIVE_FILES values can be configured per server via salt pillars.

Exception for Customer Folders

Because we do not want to back up the entire filearea folder which is in the /home/customer/<customer>/ folder, we have an exception that we will go right into the filearea folder and start the backup from there.

Exception for Exclude List

Sometimes in the backup folders we have folders which we do not want to back up for some reason.

Example of Pillar File Overriding Values 

IntegrationManager version 5.8.0