I have always assumed that a backup create by "SYSCS_UTIL.SYSCS_BACKUP_DATABASE" system procedure creates a fully functional backup copy of the database. I have used it as such with no issues. I have replaced the original database with the backup and the continued. Not that I did not try processing any transaction logs to get it up to current state. I simply shutdown the system, deleted the current database, copied the backup database in place, and restarted the system. I did not use the "restoreFrom=path" or the "createFrom=path" connection options. I guess in doing so, I lose the system's "copying the log file to the same location they were when the backup was taken", but then again, I have left the log files in their default location.
>From the manual, it states for the SYSCS_UTIL.SYSCS_BACKUP_DATABASE: The procedure then copies the entire original database directory (including data files, online transaction log files, and jar files) to the specified backup directory. And for the restoring using "restoreFrom" connection attribute: If a database with the same name exists in the derby.system.home location, the system will delete the database, copy it from the backup location, and then restart it. So it seems to me that the restore is simply a copy of the files back and restart the database. From this, I believe the backup database is a fully functioning database. I would wish that better examples for actually using the log archive mode and rolling forward recovery. I don't really understand the whole roll-forward recovery mechanism especially of what to do with the online archived logs. I can't figure out what to do with the archived log files and when they can be removed. For a system that is going to be pretty much limited touch (or as close to zero as possible) and having something like a backup cron job fire off to trigger a backup, I cannot determine from the manuals what the proper process would be to use roll-forward recovery. From: Myrna van Lunteren [mailto:[email protected]] Sent: Monday, October 28, 2013 1:26 PM To: derbydev Subject: some questions regarding backups... Hi, I have some questions regarding backups, and I hope the community can help answer these... 1. Can a backup of a database be used as a database? The directory structure of a backed up database looks very similar to a normal database. 1.b. What's the difference, if any? I think though that actually using a backed up database as if it is a database destroys it as a back-up, that is, once you start using it, even just for selects, the most recent transaction log will conflict with the ones in the original database. 1.c. Is this interpretation correct? 1.d. What would the expected behavior be if someone would use such a compromised backup to restore? 2. If no other activity has taken place, should the file sizes for the .dat files in the seg0 be the same in a backed up database as the database from which it was taken? Thanks, Myrna
