Skip to content

Data Backup and Restoration Procedures

Joe Prochazka edited this page Jun 28, 2024 · 2 revisions

Creating Backups

A script is available to automate the backup process.

adsb-receiver/bash/tools/portal_backup.sh

However, if you would like to manually backup your data...

In order to create backup copies of your graph and/or non-MySQL related portal data you will want to make a copy of the following directories and all their contents. Be sure to store these copies in a safe place preferably separate from your ADS-B receiver's file system.

Graph Data

cp /var/lib/collectd/rrd/ /PATH_TO_BACKUP_DIRECTORY/

XML & SQLite Portal Data

It is safe to exclude the file settings.xml from your backup plans being the data contained within this file will need to be replaced by the data collected from the installation script when restoring your device.

cp -r !(settings.xml) /var/www/html/data/ /PATH_TO_BACKUP_DIRECTORY/

MariaDB (MySQL) Portal Data

Backing up MariaDB (MySQL) data will require the use of the mysqldump utility installed along with MariaDB when you first set up your ADS-B receiver using the ADS-B Receiver Project installation scripts.

mysqldump -uroot -p PORTAL_DATABASE_NAME > /PATH_TO_BACKUP_DIRECTORY/NAME_OF_BACKUP_FILE.sql

Restoring Data

To restore data from copied files simply place them back into the same location they were found once the new receiver is fully set up. Be sure to overwrite any files which already may exist with those you backed up.

To restore a MariaDB (MySQL) data execute the following command against the dump file you created when backing it up.

mysql -uroot -p PORTAL_DATABASE_NAME < /PATH_TO_BACKUP_DIRECTORY/NAME_OF_BACKUP_FILE.sql