If you're a regular developer and don't have access to server side backup facilities on Oracle you might be tempted to use Oracle's SQL Developer.
While testing Keycloak 6.0.1 to 12.0.4 upgrade I had to backup and then restore the original Keycloak tables a few times.
My first naive attempts used CSV or Excel formats so I can inspect the values offline. This however turned out to be a bad idea since blobs in tables (passwords for instance), were left out of the backup.
Finally I ended with the following steps for backup:
- Select all tables you need backed up and then "Export ..."
- Select the following settings for the expor
Export DDL is needed to recreate the tables from scratch
I use Export DDL | Drops to automate the dropping of the tables
Format: loader allows you to save data blobs as well
Save As | Separate Directories structures the data nicely - If you need to do that export multiple times (as I had to) you'd be better off with making this the defaults like that under Tools | Preferences
To restore the backup open the Generated-<timestamp>.sql inside the backup directory and execute it.
No comments:
Post a Comment