Eduardo Issao Ito
Posted on April 14, 2022
Creating the backup
Exporting DDL from EXAMPLE schema:
db2look -d MYDB -z EXAMPLE -e -o EXAMPLE.sql
Exporting data from schema:
db2move MYDB export -sn EXAMPLE
The db2move
command will create a lot of files, incluing db2move.lst
.
It contains internal tables like EXPLAIN_* and ADVISE_*. If you don't need them just delete de corresponding lines from db2move.lst
.
Restoring backup
Creating objects:
db2 -t -f EXAMPLE.sql
Restoring data:
db2move MYDB import
db2move MYDB import -io insert_update
💖 💪 🙅 🚩
Eduardo Issao Ito
Posted on April 14, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.