Published Date: December 12, 2023
Validated: Yes
Audience: Everyone
Products and Versions Covered:
- Environment: Self-hosted - Data Backups
- Deployment Migration(s):
- On-premises to Cloud Migrations
- On-premises to Customer-Validated Cloud Migrations
Summary
Our top recommended backup file type for deployment migrations is the .jama backup file. This comprehensive option, accessible through the backup tab in Jama Connect®root menu, encapsulates all necessary data, including the database and various assets such as attachments, reports, diagrams, equations, and metrics. It is particularly advantageous for small to medium-sized datasets and is fully compatible with Microsoft SQL Server and MySQL.
Customers must provide database backups and assets during deployment migrations. Assets must be backed up separately by tarring them for backups other than .jama files. For KOTS installations, customers must exec into the core-0 pod to perform this.
Backup procedures involve selecting options from the backup tab based on the backup type:
Option #3 for
.jamabackupOption #2 for XML backup
Data set sizes are categorized into small, medium, and large based on the backup type (.jama, XML, MySQLDump).
This article covers:
.jamabackupXML backup
MSSQL proprietary backup
MySQLDump
Backing up assets
Data set sizing
Resolution
1. .jama Backup File
Accessed through the backup tab in Jama Connect® root admin panel.
Contains all necessary information, including the database and assets.
Suitable for small to medium datasets; compatible with MSSQL and MySQL.
Steps to create a .jama backup:
Log in as the root user.
Navigate to the backup tab.
Select option #3 for the
.jamabackup.Use the examples below to locate your backups from within the core-0 pod and copy them to a local directory
## list the contents of the backup directory from within the core-0 pod kubectl exec core-0 -c core -- ls -lh /home/contour/tenant/<yourTenantName>/backup ## copy the backup from the core-0 pod to a local directory kubectl cp core-0:/home/contour/tenant/<yourTenantName>/backup/<yourBackupFile> ./<yourBackupFile> -c core ## examples kubectl exec core-0 -c core -- ls -lh /home/contour/tenant/jamasb/backup total 37M -rw-r----- 1 tomcat tomcat 24M Apr 14 15:15 backup202604141515.xml -rw-r----- 1 tomcat tomcat 13M Apr 14 15:15 jamasb__202604141515.jama kubectl cp core-0:/home/contour/tenant/jamasb/backup/backup202604141515.xml ./backup202604141515.xml -c core
2. XML Backup File
Accessed through the backup tab; includes only the database (no assets).
Recommended for moving large datasets from MSSQL to MySQL.
Steps to create an XML backup:
Log in as the root user.
Navigate to the backup tab.
Select option #2 for the XML backup.
Back up assets separately if needed (see “Backing up assets” section).
File location: same as
.jamabackups
3. MSSQL Proprietary Backup
Recommended for extensive data on MSSQL.
Assets must be backed up separately
4. MySQLDump
Recommended for customers already on MySQL with extensive data.
Command:
mysqldump --max-allowed-packet=25M --single-transaction --skip-add-locks --routines --set-gtid-purged=OFF -u root -p DATABASENAME > DATABASENAME_$(date +%Y%m%d).sql5. Backing up Assets
When using any option other than .jama, assets must be backed up separately:
Steps:
SPEC_NAME=$(kubectl get pod core-0 -o jsonpath='{.spec.containers[0].env[?(@.name=="TENANT_NAME")].value}') && \
kubectl exec core-0 -c core -- sh -c "
PROP_NAME=\$(grep 'server.tenants=' /home/contour/tenant.properties | cut -d'=' -f2);
if [ \"\$PROP_NAME\" != \"$SPEC_NAME\" ]; then
echo \"ERROR: Misalignment! Spec: $SPEC_NAME vs Prop: \$PROP_NAME\" >&2;
exit 1;
fi;
BASE_DIR=\"/home/contour/tenant/\$PROP_NAME\";
EXISTING_DIRS=\$(cd \$BASE_DIR && ls -d attachments avatars diagrams equations reports tempreports 2>/dev/null);
if [ -z \"\$EXISTING_DIRS\" ]; then
echo \"ERROR: No valid asset directories found in \$BASE_DIR\" >&2;
exit 1;
fi;
tar -C \"\$BASE_DIR\" -zcf - \$EXISTING_DIRS" > assets.tar.gz
Data Set Sizing:
| Size | XML Backup | .jama Backup | MySQLDump | Archived Assets |
|---|---|---|---|---|
| Small | ≤1 GB | ≤2 GB | ≤1 GB | <1 GB |
| Medium | 2–3 GB | 2–3 GB | 2–3 GB | 2-5 GB |
| Large | ≥3 GB | ≥3 GB | ≥3 GB | ≥5 GB |
Feedback:
We welcome your input! Please sign in to leave any comments, suggestions, or improvement ideas below.
Comments
0 comments
Please sign in to leave a comment.