DashBox Database Backup
Posted: Tue Jul 19, 2016 1:58 pm
Versions
V1.3
- Changed export format to plain formatting to provide compatibility across PostgreSQL versions.
V1.2
- Added exclude System Tables option.
- Added exclude Old Minute table option (this is only for customers with data before May 2015).
The old_minute table contains all data before minute tables were partitioned. It can take a long time to restore depending on the size. It's suggested that this table is exported separately, and it only needs to be exported once as it doesn't change.
V1.1
- Initial Version
DashBox Settings
A password must be setup for the Backup to operate. This password can be set in the DashBox Settings area.
Under DashBox Settings:
- System -> Backup Settings
Windows Users
The program is available here:
https://www.brultech.com/software/files/getsoft/1/4
Requirements
- Java Run-Time Engine (JRE) (http://www.java.com/).
- 600MB per 16GB of data (per backup).
How-to Run
The DashBox backup program is a program written in Java. No installation is required, the only requirement is JRE (as listed above). To run the program:
- Extract the full zip file to any folder.
- Double-click the JAR file.
The backup program will create a backup.bat file in the folder it's located in and automatically run this file. For future backups, you can just run the .bat file it creates.
The bat file can also be automated via a Windows Task. It'll automatically timestamp the file.
Windows 10 Automated Backups
In the example below, we'll be setting up a task that will backup the DashBox twice a week.
- Right-click on the Start Menu and go to Settings.
- Type in Task Scheduler into the Search Box.
- Click "Create Basic Task" in the left menu.
- Give the task a name and description and click Next.
- Select weekly from the list of backup ranges and click Next.
- The below settings will backup every Tuesday and Friday at noon. Click Next afterwards.
- Leave the task setting as program and click Next.
- Move the backup program to somewhere easily accessible. The settings you need will be similar to the image below. You'll replace C:\DashBoxBackups\ with whatever folder you're using to store the backups. The "Add Arguments" field is below. Click Next when finished.
- The last screen will give you an overview of what you've created, just click finish when done.
- When the backup runs, it'll pop up for a second then minimize and run in the background. It shouldn't take much resources to run. As long as the window isn't closed, the backup will be completed successfully.
Linux/Mac Users
The DashBox is running a PostgreSQL 9.1 database. You can try to install via a package manager (apt, etc) if you can find a version of 9.1. If not, you can pick up a copy of the pg_dump binaries here: https://www.enterprisedb.com/download-p ... l-binaries. Using -Fp however should allow dumps to be restored across PostgreSQL version (-Fp outputs plain SQL), -Z6 adds compression to these archives.
The dump command is as follows:
To automate you'll want to create a .pgpass file in the home directory of the user that looks as follows:
You'll also need to set its permissions
V1.3
- Changed export format to plain formatting to provide compatibility across PostgreSQL versions.
V1.2
- Added exclude System Tables option.
- Added exclude Old Minute table option (this is only for customers with data before May 2015).
The old_minute table contains all data before minute tables were partitioned. It can take a long time to restore depending on the size. It's suggested that this table is exported separately, and it only needs to be exported once as it doesn't change.
V1.1
- Initial Version
DashBox Settings
A password must be setup for the Backup to operate. This password can be set in the DashBox Settings area.
Under DashBox Settings:
- System -> Backup Settings
Windows Users
The program is available here:
https://www.brultech.com/software/files/getsoft/1/4
Requirements
- Java Run-Time Engine (JRE) (http://www.java.com/).
- 600MB per 16GB of data (per backup).
How-to Run
The DashBox backup program is a program written in Java. No installation is required, the only requirement is JRE (as listed above). To run the program:
- Extract the full zip file to any folder.
- Double-click the JAR file.
The backup program will create a backup.bat file in the folder it's located in and automatically run this file. For future backups, you can just run the .bat file it creates.
The bat file can also be automated via a Windows Task. It'll automatically timestamp the file.
Windows 10 Automated Backups
In the example below, we'll be setting up a task that will backup the DashBox twice a week.
- Right-click on the Start Menu and go to Settings.
- Type in Task Scheduler into the Search Box.
- Click "Create Basic Task" in the left menu.
- Give the task a name and description and click Next.
- Select weekly from the list of backup ranges and click Next.
- The below settings will backup every Tuesday and Friday at noon. Click Next afterwards.
- Leave the task setting as program and click Next.
- Move the backup program to somewhere easily accessible. The settings you need will be similar to the image below. You'll replace C:\DashBoxBackups\ with whatever folder you're using to store the backups. The "Add Arguments" field is below. Click Next when finished.
Code: Select all
/c start /min C:\DashBoxBackups\backup.bat ^& exit
- When the backup runs, it'll pop up for a second then minimize and run in the background. It shouldn't take much resources to run. As long as the window isn't closed, the backup will be completed successfully.
Linux/Mac Users
The DashBox is running a PostgreSQL 9.1 database. You can try to install via a package manager (apt, etc) if you can find a version of 9.1. If not, you can pick up a copy of the pg_dump binaries here: https://www.enterprisedb.com/download-p ... l-binaries. Using -Fp however should allow dumps to be restored across PostgreSQL version (-Fp outputs plain SQL), -Z6 adds compression to these archives.
The dump command is as follows:
Code: Select all
pg_dump -Fp -Z6 -x -O -h <dashbox ip> -U dbbackup -f backup.gz brultech_dash
Code: Select all
<dashbox ip>:5432:brultech_dash:dbbackup:<password>
Code: Select all
chmod 600 ~/.pgpass