Page 1 of 4

DashBox Database Backup

Posted: Tue Jul 19, 2016 1:58 pm
by ben
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.
createtask.png
createtask.png (37.8 KiB) Viewed 15718 times
- Give the task a name and description and click Next.
taskname.png
taskname.png (12.49 KiB) Viewed 15718 times
- Select weekly from the list of backup ranges and click Next.
taskdate.png
taskdate.png (11.8 KiB) Viewed 15718 times
- The below settings will backup every Tuesday and Friday at noon. Click Next afterwards.
taskdatetime.png
taskdatetime.png (12.43 KiB) Viewed 15718 times
- Leave the task setting as program and click Next.
taskaction.png
taskaction.png (10.28 KiB) Viewed 15718 times
- 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
taskcmd.png
taskcmd.png (10.88 KiB) Viewed 15718 times
- The last screen will give you an overview of what you've created, just click finish when done.
taskfinish.png
taskfinish.png (16.66 KiB) Viewed 15718 times
- 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
To automate you'll want to create a .pgpass file in the home directory of the user that looks as follows:

Code: Select all

<dashbox ip>:5432:brultech_dash:dbbackup:<password>
You'll also need to set its permissions

Code: Select all

chmod 600 ~/.pgpass

Re: DashBox Database Backup

Posted: Wed Aug 31, 2016 3:36 pm
by SirMaple
Would it be possible to get a Linux version?

Would be great to have this run on a crontab weekly.

Re: DashBox Database Backup

Posted: Thu Sep 01, 2016 9:29 am
by ben
EDIT: Old information removed.

Re: DashBox Database Backup V1.1

Posted: Tue Aug 08, 2017 4:13 pm
by ben
Updated with new method.

Re: DashBox Database Backup V1.1

Posted: Tue Oct 17, 2017 1:47 pm
by johnstonf
Screen Shot 2017-10-17 at 4.25.11 PM.png
Screen Shot 2017-10-17 at 4.25.11 PM.png (520.07 KiB) Viewed 15737 times
I "just" upgraded my DashBox to latest v4.2.3c9k.
I then run latest DashBox Database Backup v1.1, and it specifically says:
"Requires DashBox 4.2.3d or higher"
what??!! (I'm serious, it REALLY DOES!)
(I attached a photo, cause i thought my eyes were decieving me)

Help!

Re: DashBox Database Backup V1.1

Posted: Tue Oct 17, 2017 2:04 pm
by Teken
Hello Fred,

Does the back up process work as intended? Or are you simply worried about the notification on the top?

Re: DashBox Database Backup V1.1

Posted: Tue Oct 17, 2017 3:27 pm
by johnstonf
I don't want to proceed with the ominous message...
First time trying to get a backup.
/f

Re: DashBox Database Backup V1.1

Posted: Tue Oct 17, 2017 3:28 pm
by Teken
johnstonf wrote:I don't want to proceed with the ominous message...
First time trying to get a backup.
/f
You will be fine ~ Go for it! :mrgreen:

Re: DashBox Database Backup V1.1

Posted: Tue Oct 17, 2017 3:36 pm
by johnstonf
Sounds like I'm missing a version update somewhere.
Don't want backup to be incompatible with restore.
You don't really get to verify that the backup is good.


Teken wrote:
johnstonf wrote:I don't want to proceed with the ominous message...
First time trying to get a backup.
/f
You will be fine ~ Go for it! :mrgreen:

Re: DashBox Database Backup V1.1

Posted: Tue Oct 17, 2017 3:39 pm
by Teken
johnstonf wrote:Sounds like I'm missing a version update somewhere.
Don't want backup to be incompatible with restore.
You don't really get to verify that the backup is good.


Teken wrote:
johnstonf wrote:I don't want to proceed with the ominous message...
First time trying to get a backup.
/f
You will be fine ~ Go for it! :mrgreen:
You're not missing anything the back up software was released some time ago. But the Dash Box firmware naming schema has changed a little so the message at the top is not relevant. You currently only have the ability to make a back up there is no user ability to restore the same.

This is being worked on . . .