Unix Technical Forum

Newbie backup Q

This is a discussion on Newbie backup Q within the DB2 forums, part of the Database Server Software category; --> I'm using db2 (version 7) for the first time as part of an MSc course and I've got a ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 03:58 PM
Simon Harris
 
Posts: n/a
Default Newbie backup Q

I'm using db2 (version 7) for the first time as part of an MSc course
and I've got a really basic question. It's an on-line course, so I can
do some stuff at home and, when I have time, some at work. The problem
is, if I'm working on a db project, what's the best way to get an
up-to-date copy of the db I'm working on in a readily transportable
format between work and home?
It was suggested by another student that I do some sort of backup of
the latest version and then restore it to the other machine and carry
on working. Does that sound reasonable? We're only up to creating
tables, keys and inserting data (only on week 2) so we're nowhere
*near* backups yet! Can anyone provide a *very* simple instruction to
do a whole db backup? I'm sure none of my projects will be large
enough to justify incremental backups etc! Also, being able to restore
a complete backup over the top of a totally messed-up version sounds
like a pretty useful feature!

Simon Harris (DB2 very-newbie)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 03:58 PM
Mark A
 
Posts: n/a
Default Re: Newbie backup Q

"Simon Harris" <simon.harris@kingshc.nhs.uk> wrote in message
news:d827adc7.0311050837.318d6e2f@posting.google.c om...
> I'm using db2 (version 7) for the first time as part of an MSc course
> and I've got a really basic question. It's an on-line course, so I can
> do some stuff at home and, when I have time, some at work. The problem
> is, if I'm working on a db project, what's the best way to get an
> up-to-date copy of the db I'm working on in a readily transportable
> format between work and home?
> It was suggested by another student that I do some sort of backup of
> the latest version and then restore it to the other machine and carry
> on working. Does that sound reasonable? We're only up to creating
> tables, keys and inserting data (only on week 2) so we're nowhere
> *near* backups yet! Can anyone provide a *very* simple instruction to
> do a whole db backup? I'm sure none of my projects will be large
> enough to justify incremental backups etc! Also, being able to restore
> a complete backup over the top of a totally messed-up version sounds
> like a pretty useful feature!
>
> Simon Harris (DB2 very-newbie)


First thing you need is to download all the manuals at the IBM web site.
Here are the version 7 manuals.
http://www-3.ibm.com/cgi-bin/db2www/...bs.d2w/en_main
(this link may span 2 lines)
Make sure you have the version of Acrobat Reader that allows text searches.
Look in the Command Reference manual for backup. You can also backup the
database from the Control Center.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 03:58 PM
Blair Adamache
 
Posts: n/a
Default Re: Newbie backup Q

You could backup the entire database. Or, export all tables with db2move
and capture all DDL with db2look -e.

Simon Harris wrote:

> I'm using db2 (version 7) for the first time as part of an MSc course
> and I've got a really basic question. It's an on-line course, so I can
> do some stuff at home and, when I have time, some at work. The problem
> is, if I'm working on a db project, what's the best way to get an
> up-to-date copy of the db I'm working on in a readily transportable
> format between work and home?
> It was suggested by another student that I do some sort of backup of
> the latest version and then restore it to the other machine and carry
> on working. Does that sound reasonable? We're only up to creating
> tables, keys and inserting data (only on week 2) so we're nowhere
> *near* backups yet! Can anyone provide a *very* simple instruction to
> do a whole db backup? I'm sure none of my projects will be large
> enough to justify incremental backups etc! Also, being able to restore
> a complete backup over the top of a totally messed-up version sounds
> like a pretty useful feature!
>
> Simon Harris (DB2 very-newbie)


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 03:59 PM
Amar
 
Posts: n/a
Default Re: Newbie backup Q

"db2 backup db sample"
take the backup with you at home.
"db2 restore db sample"

Note that this works on same platforms, means you can't restore backup
copy of unix on windows and vice-versa. Hit the command manual for
more info.

Thanks,
Amar


Blair Adamache <badamache@2muchspam.yahoo.com> wrote in message news:<bobh64$sh3$2@hanover.torolab.ibm.com>...
> You could backup the entire database. Or, export all tables with db2move
> and capture all DDL with db2look -e.
>
> Simon Harris wrote:
>
> > I'm using db2 (version 7) for the first time as part of an MSc course
> > and I've got a really basic question. It's an on-line course, so I can
> > do some stuff at home and, when I have time, some at work. The problem
> > is, if I'm working on a db project, what's the best way to get an
> > up-to-date copy of the db I'm working on in a readily transportable
> > format between work and home?
> > It was suggested by another student that I do some sort of backup of
> > the latest version and then restore it to the other machine and carry
> > on working. Does that sound reasonable? We're only up to creating
> > tables, keys and inserting data (only on week 2) so we're nowhere
> > *near* backups yet! Can anyone provide a *very* simple instruction to
> > do a whole db backup? I'm sure none of my projects will be large
> > enough to justify incremental backups etc! Also, being able to restore
> > a complete backup over the top of a totally messed-up version sounds
> > like a pretty useful feature!
> >
> > Simon Harris (DB2 very-newbie)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 04:00 PM
Simon Harris
 
Posts: n/a
Default Re: Newbie backup Q

heyhi_999@yahoo.com (Amar) wrote in message news:<476fd0ca.0311061019.3e36d62b@posting.google. com>...
> "db2 backup db sample"
> take the backup with you at home.
> "db2 restore db sample"
>

Thanks to everyone so far for the suggestions. The above method has
just the simplicity I was looking for! Small question - what does the
backup look like? I.e. what is it called and where is it filed (by
default)?
In my defense, I *have* started looking at this in the manuals and it
looks like I might have to specify that I want it to overwrite the
existing version - anything I should look out for there?
TIA,

Simon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-26-2008, 04:00 PM
Blair Adamache
 
Posts: n/a
Default Re: Newbie backup Q

db2 backup db sample to d:

Backup successful. The timestamp for this backup image is : 20031107112539

The backup image will be named thusly:

D:\>dir sample.0\*.001 /s

Directory of D:\sample.0\DB2\NODE0000\CATN0000\20031107

11/07/2003 11:26a 25,186,304 112539.001

Simon Harris wrote:

> heyhi_999@yahoo.com (Amar) wrote in message news:<476fd0ca.0311061019.3e36d62b@posting.google. com>...
>
>>"db2 backup db sample"
>>take the backup with you at home.
>>"db2 restore db sample"
>>

>
> Thanks to everyone so far for the suggestions. The above method has
> just the simplicity I was looking for! Small question - what does the
> backup look like? I.e. what is it called and where is it filed (by
> default)?
> In my defense, I *have* started looking at this in the manuals and it
> looks like I might have to specify that I want it to overwrite the
> existing version - anything I should look out for there?
> TIA,
>
> Simon


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:11 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com