Maintenance

Maintenance

Maintenance

This article explains what to backup at regular intervals. You may apply a different approach for the backup procedure but instructions in this article will give you a big picture view.

File Backup

Oempro files are stored under /opt/oempro/ directory on the server. A complete backup of this directory can be taken manually:

cd /opt/
tar -cvzf oempro.yyyymmdd.tar.gz oempro/

Or you can create a backup script:

mkdir /root/file_backups
touch /root/file_backups/file_backup.sh
>>> Edit the file_backup.sh
#!/bin/bash

fileName="oempro_files_$(date +%s).tar.gz"

echo "Target file: $fileName"

tar -zcvf /root/file_backups/$fileName /opt/oempro/

MySQL Backup

If you are using Oempro’s built-in MySQL Docker container, MySQL data files are stored inside /opt/oempro/_dockerfiles/mysql directory.

You can take a MySQL backup using many different approaches such as InnoDB backup, or regular MySQL dump backup. Below, you can see an example bash script which takes a MySQL dump backup:

mkdir /root/mysql_backups
touch /root/mysql_backups/mysql_backup.sh
>>> Edit the mysql_backup.sh
#!/bin/bash

fileName="oempro_mysql_$(date +%s).sql.gz"

echo "Target file: $fileName"

mysqldump -u root -p"XXXXXXX" -h 192.168.99.108 oempro --column-statistics=0 --single-transaction --quick --lock-tables=false | gzip -9 -c > /root/mysql_backups/$fileName
ℹ️
The MySQL password can be found inside /opt/oempro/.oempro_mysql_env file.

File Structure

Oempro’s data files are stored under:

  • /opt/oempro/_dockerfiles This directory stores MySQL, Elasticsearch, RabbitMQ and Redis data as well as many configuration files for Docker containers.
  • /opt/oempro/data This directory stores Oempro app data such as temporary import files, attachments, embedded images, logs, etc.
💠
image

Homepage Customer Area Community Portal Contact Us

Footer Social Icons

©Copyright Octeth, Inc. All rights reserved.