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/
>>> Edit the

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/
>>> Edit the

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

echo "Target file: $fileName"

mysqldump -u root -p"XXXXXXX" -h 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.



Footer Social Icons

©Copyright Octeth, Inc. All rights reserved.