I'm looking for the best way to backup my pervasive database. I've read the documentation but still have a few questions.
It appears that Continuous Operations method only allows me to backup the entire database? So I'd do butil -startbu @filelist
, then backup the entire database (copy, rsync, etc), then run butil -endbu @filelist
. Looking through the documentation I don't see a way to get transaction logs out of this method; like I would do for MSSQL (BACKUP LOG ACCT TO DISK
) or Postgres (archive_command
). With rsync, it might be feasible to still do this every 15 minutes.
The Archival Logging method means I would have to occasionally stop the database to get a full backup, which is acceptable for me. But can I copy the log files off of the server every 15 minutes, ie log shipping?
Thank you.
From reading the rest of that chapter, it appears your surmise is correct. There is no equivalent to MS-SQL log shipping.
Thus, there are transaction logs, but it doesn't seem that the system puts any sort of structure around shipping them or assuring that they're doing what you would count on them to be doing. IOW, I don't know how you'll confirm that any given transacation log is consistent with any given full backup takenw ith Continuous Operation.
If you want to do archival logging every 15 minutes, you have to shut down the DB every 15 minutes. That's not a normal mode of operation for most production databases - does your environment allow that?
My understanding on the archival logs is that you have to manually delete them after each backup as they are constantly being written to, so you could potentially back them up every 15min.
Initial Step: Stop the db, create a backup, turn archival on, start db Then, you could backup the archives every 15min for ~24hrs. Next full backup: Stop the db, create a backup, delete/rename archives, start db Then, you could backup the archives every 15min for ~24hrs. Next full backup: Stop the db, create a backup, delete/rename archives, start db ....so on
The reason, as I understand it, is that if you don't delete/rename the archives, it will still include all the changes since your first backup (which are in your newer backup already). The maintenance of the archives is YOUR responsibility...doesn't seem like there is anything automated around this.
From the Advanced Operations Guide
"After a successful backup, delete all existing archival logs.
Caution: Delete the corresponding log files before you resume working with the data files. Synchronizing the backup data files and the corresponding log files is a critical factor of successful recovery."