You'll need to use a redirect restore method as Marcus_A said.
Example (assumed you are using a full offline backup)
1st - create a new blank database in either the same instance or a new one. It can even be on another machine. Just make sure you have access to the backup file wherever your new database resides. I suggest making a blank database because you can set the configs to low levels if needed. Many times you may be making a copy of production that allocates huge bufferpools, other mem pools, and huge logs. You may be moving this copy to another system that cannot handle the settings. I find it better to restore over an existing blank db with mild configurations first and then tune the new db if necessary. A redirected restore will not change the dbconfig settings.
2nd - run the redirect commands
db2 restore database <source database name> from <path> taken at <timestamp> into <target database> resplace existing redirect without rolling forward;
-- NOTE: at this point the database has been partially restored, but the tablespace containers need to be set. Make sure you know what you are doing here. You need to assign each tablespace a new set of containers so the new database has a place to store data. DO NOT use the same paths/file names as the source database. This is a very simple example. It does not include possible DMS tablespaces, nor multiple containers per tablespace.
db2 "set tablespace containers for 0 using (path 'db2/01/catlog')"
db2 "set tablespace containers for 1 using (path 'db2/01/temp')"
db2 "set tablespace containers for 2 using (path 'db2/01/userspace')"
db2 restore database <source database> continue
_______________________________________________
Again, this is a very simple example. It will not work if you try to use an online backup, or if you have more tablespaces than just the basic ones. Also, beware if you have created new bufferpools. The blank database you restore over must have all bufferpools defined in the source database. THe allocations can be different, but they have to exist.
For instance, let's say you had created new tablespaces "BIG_DMS_DATA" and "BIG_DMS_INDEX" and also created two new bufferpools "DMSDATABP and DMSINDEXBP on the source database. You need to make sure that the new blank target database also has the two new bufferpools. You don;t need to create the tablespaces inthe new database though. THe restore will do that for you, but you do need to add set container commands in the restore to address the tablespaces.
Example:
db2 restore .... redirect....
db2 "set tablespace containers for 0 using (path 'db2/01/catlog')"
db2 "set tablespace containers for 1 using (path 'db2/01/temp')"
db2 "set tablespace containers for 2 using (path 'db2/01/userspace')"
db2 "set tablespace containers for 3 using (file 'db2/01/dmsdata1' 524288, file 'db2/02/dmsdata2' 524288)"
db2 "set tablespace containers for 4 using (file 'db2/01/dmsindex1' 262144, file 'db2/02/dmsindex2' 262144)"
db2 restore database <source database> continue
This example shows 2 dms tbspaces with 2 containers each.
Hope this helps.
-- Steve
Certified DB2 LUW DBA