Discussion:
Backup to cloud?
(too old to reply)
Rhino
2016-12-13 18:36:27 UTC
Permalink
I know of The Cloud but I haven't had to write code that works with the
cloud yet. Is it possible to back up a DB2 database (using 10.5.0 for
Windows) to the cloud? If so, how does one write the command to do so?
I'm not sure what the syntax should look like.

If it is not possible to do a backup directly to the cloud, how could I
do it indirectly?
--
Rhino
Mladen Gogala
2016-12-14 21:24:16 UTC
Permalink
Post by Rhino
I know of The Cloud but I haven't had to write code that works with the
cloud yet. Is it possible to back up a DB2 database (using 10.5.0 for
Windows) to the cloud? If so, how does one write the command to do so?
I'm not sure what the syntax should look like.
If it is not possible to do a backup directly to the cloud, how could I
do it indirectly?
Well, DB2 uses API to backup and restore data. Here is
what I have been able to find about that library:

http://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.apdv.api.doc/doc/r0001908.html

That library is not an open source library, so you will
probably have to buy the specification from IBM. When you
implement that library, you will need to use vendor backup,
like this:

DB2 BACKUP DATABASE SAMPLE LOAD '/my/backup/library.so';

That is the same procedure as the one used by backup vendors
like Commvault, EMC or Veritas. Those vendors already have the
ability to backup to the cloud, but if you want to write your
own backup library, that's OK, too.

Another method would be to backup to your local directory and
replicate the file to the cloud. For that, you would only need
a "sync", probably based on rsync. The problem with that approach
is that it doesn't work very well with large databases. You would
need to copy a few TB from the cloud to the local directory and
then use restore and rollforward to get back your DB. With few TB,
that process is far from being instantaneous.
Also, cheap services like Glacier are much faster with putting the
data in than with getting the data out.
Regards
--
Mladen Gogala
The Oracle Whisperer
http://mgogala.byethost5.com
Rhino
2016-12-15 18:35:42 UTC
Permalink
Post by Mladen Gogala
Post by Rhino
I know of The Cloud but I haven't had to write code that works with the
cloud yet. Is it possible to back up a DB2 database (using 10.5.0 for
Windows) to the cloud? If so, how does one write the command to do so?
I'm not sure what the syntax should look like.
If it is not possible to do a backup directly to the cloud, how could I
do it indirectly?
Well, DB2 uses API to backup and restore data. Here is
http://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.apdv.api.doc/doc/r0001908.html
That library is not an open source library, so you will
probably have to buy the specification from IBM. When you
implement that library, you will need to use vendor backup,
DB2 BACKUP DATABASE SAMPLE LOAD '/my/backup/library.so';
That is the same procedure as the one used by backup vendors
like Commvault, EMC or Veritas. Those vendors already have the
ability to backup to the cloud, but if you want to write your
own backup library, that's OK, too.
Another method would be to backup to your local directory and
replicate the file to the cloud. For that, you would only need
a "sync", probably based on rsync. The problem with that approach
is that it doesn't work very well with large databases. You would
need to copy a few TB from the cloud to the local directory and
then use restore and rollforward to get back your DB. With few TB,
that process is far from being instantaneous.
Also, cheap services like Glacier are much faster with putting the
data in than with getting the data out.
Regards
Thank you, Mladen!
--
Rhino
Thiruswamy
2016-12-16 00:50:26 UTC
Permalink
Post by Rhino
I know of The Cloud but I haven't had to write code that works with the
cloud yet. Is it possible to back up a DB2 database (using 10.5.0 for
Windows) to the cloud? If so, how does one write the command to do so?
I'm not sure what the syntax should look like.
If it is not possible to do a backup directly to the cloud, how could I
do it indirectly?
--
Rhino
Yes It's possible to Backup to cloud directly by Creating an alias for accessing remote storage on IBM® SoftLayer® Object Storage or Amazon Simple Storage Service (S3).

Commands:

backup db testdb to DB2REMOTE://<alias>//<storage-path>

e.g
backup db testdb to DB2REMOTE://montrealprivate/bkupDir11/1453245697

where <<alias>> points to below command

catalog storage access alias montrealprivate vendor softlayer
server https://mon01.objectstorage.service.networklayer.com/auth/v1.0/
user SLOS482762-5:SL729462
password a1b635c2556681ddd8354daa2db1dbc88bb6da3311c8904319058a9434169c3


Note: Storage access aliases and remote cloud storage are supported under Linux only.

Hope this helps with DB2 11.1.
l***@gmail.com
2016-12-17 14:55:01 UTC
Permalink
Post by Rhino
I know of The Cloud but I haven't had to write code that works with the
cloud yet. Is it possible to back up a DB2 database (using 10.5.0 for
Windows) to the cloud? If so, how does one write the command to do so?
I'm not sure what the syntax should look like.
If it is not possible to do a backup directly to the cloud, how could I
do it indirectly?
--
Rhino
IBM also offers DB2 on the Cloud as a Cloud based rental.

Continue reading on narkive:
Loading...