In Part I of the series about implementing PostgreSQL for ArcGIS, we introduced PostgreSQL as a viable Enterprise Geodatabase alternative. When we left off, we had a connection to an ArcGIS 10.2.1 database, and were able to create a feature class. In Part II, we continued to discuss the use of PostgreSQL for ArcGIS by adding a schema owner to receive and own feature datasets (plus contents). And lastly, we created permission roles and assign users to those roles. In this Post, we address a backup/restoration procedure.
In a previous blog post, I discussed the importance of a database backup. A good backup is so important, I am reminded of a song from the band Exile which formed in my childhood hometown of Richmond, Kentucky.
Implementing PostgreSQL for ArcGIS: How to Create Your Backup in PostgreSQL
To create a backup in PostgreSQL, one only needs to follow a simple procedure.
- Login to pgAdmin, and navigate to the desired database. In this example, I will be using the same database that was utilized in the first two parts of the series.
- Right-click on the database, and select Backup (Figure1).
- In the resultant GUI, specify the filename and location of the Backup file.
- Utilize the "Tar" format, and click the "Backup" button.
- After clicking the "Backup" button, the process is initiated. Upon completion, the logging messages appear (Figure 3). Verify the messages for error.
- Click the "Done" button, to be done.
Restoration of Backup in PostgreSQL
As previously written about…..Accidents happen. As an example, I am deleting the object “BufferTube” from the database we just backed up (Figure 4). For those familar with the Telecommunications model, that object is involved with two attribute relationships (the parent Fiber Optic Cable and the child Fiber Strand).
After "accidental" deletion of the BufferTube object, we see it removed as well as the associated relationships (Figure 5).
Now is the time when a panicked coworker needs the table restored. Piece of cake. Conduct the following procedure to restore the PostgreSQL database:
- Right-click the database and click "Restore" (Figure 6).
- In the subsequent GUI, verify the "Tar" format option is selected.
- Choose the applicable restoration file in the Filename text box and click the "Restore" button.
Following restoration, we observe that the table is back and the relationships (Figure 8). Life's Been Good and remains good!
As I write this blog post, I am recovering from full hip replacement surgery. Needless to say, it has been an “experience,” one that has caused a full-tilt fighter to reluctantly learn patience. Three things:
- We never appreciate good health. Inability/difficulty walking, putting clothes on, tying shoes, and relying on others has certainly done that. To those who have aided me (especially my father), THANK YOU!!! When a person is in need, they learn who their friends are.
- The surgeon’s and surgery facility’s focus on QAQC was outstanding. From repeated questions as to what hip they were operating to the surgeon writing his initials on my side (wasn’t too excited about this at the time), similar procedures could be applied to work. Cross checking works.
- After one session of physical therapy, I learned that I truly let my health go a bit. To loosely quote Rodney Dangerfield.....If I had died on the surgery table, I could have donated my body to science fiction. NEVER GOING TO LET MY PHYSICAL HEALTH GET THIS BAD AGAIN. Already set the goal of climbing at least one Colorado 14K foot peak next year.
- Big thanks to SSP Innovations for their flexibility in working with my surgery/recovery schedule.