The following article describes how to back up and restore a DB2 database in a Linux operating system, the following describes how to back up and restore the DB2 database in the Lin operating system environment. I hope this will help you in your future studies.
Linux, environment, database Linux, database, Environment
Restore the database backed up by the following backup script
Backup script:
- ./Home/db2admin/sqllib/db2profile
- Db2 backup db datedb online to/dbbackup/date include logs
- Cd/dbbackup/datetoday = 'date + "% Y % m % d "'
- File1 = "* $ today *"
- Ftpfile = 'ls $ file1'
- Echo $ ftpfile
- Lftp-c "open ftp address; user username and password @ \ $0; put $ ftpfile"
- Find/dbbackup/date-ctime + 15-exec rm {}\;
Recovery command:
Log on to the server using the root command and switch to the database user name using the su-db2admin command.
Go to the backup file storage directory
Run the following command:
- [db2admin@localhost db2back]$ db2 restore db datedb from /hom
The above content is an introduction to the backup and recovery of the DB2 database in the Linux environment. I hope you will have some gains.
The above content is an introduction to the backup and recovery of the DB2 database in the Linux environment. I hope you will have some gains.