DB2 database backup restore db2 online backup command: www.2cto.com db2 connect to DBName user userName using passworddb2 update db cfg for DBName using logretain ondb2 force applications alldb2 backup db DBName online TODD: /db2bak can write the above four commands in a bat file. Each Command occupies one line and runs the bat file on the machine containing the DB2 database. If the DB2 version is 9, the backup file name is "DBName.0.DB2. node).catn2017.2013024251655.001 "If DB2 version is 8, the name of the backed up file is" 171655.001 ", this file is stored in the DB2 restoration command "DBName.0/db2/NODE0000/CATN0000/20130220/": db2 restore database DBName fromD: \ db2bak taken at 20130227143108 without rolling forward without prompting can write the command into a bat file to run and restore the command. Double quotation marks are added to the command, followed by "db2cmd ", that is, the db2cmd "db2 restore database DBName fromD: \ db2bak taken at 20130227143108 Out rolling forward without prompting "is written to a bat file. Run the bat file to restore it. If it is backed up by DB2 9, the path after from is written to the direct parent directory of the file. If it is backed up by DB2 8, the path after from is written to the direct parent directory of DBName.0.