arcmain COPY DATA from S3 bucket to Teradata AMI on AWS

Database
Enthusiast

arcmain COPY DATA from S3 bucket to Teradata AMI on AWS

Hello,

        I have created an archive file from on-premise Teradata database with the script as shown below and uploaded the dump.nn.out file to S3 bucket.

I want to RESTORE/COPY this dump.nn.out file into a Teradata AMI hosted on AWS.

 

Question 1). Is it possible to restore/copy database from archive file in S3 bucket to Teradata AMI via arcmain utility.

Question 2). If it is possible how do I point the FILEDEF to S3 bucket.

 

Thanks.

 

 

----------------------Backup Database---------------------------------------------------------------------------------------------------------------------

arcmain SESSIONS=8 CS=UTF8 OUTLOG=backup.log FILEDEF='(ARCHIVE,/data/backup/dump.%UEN%.out)'<<EOC
.logon xx.xx.xx.xx/id,password;
ARCHIVE DATA TABLES (DBTEST) ALL,
INDEXES,
RELEASE LOCK,
FILE=ARCHIVE;
.logoff;
.exit;
EOC

----------------------Restore/Copy Database---------------------------------------------------------------------------------------------------------------------

arcmain SESSIONS=8 CS=UTF8 OUTLOG=copy_02.log FILEDEF='(ARCHIVE,/data/backup/dump.59.out)'<<EOC
.logon xx.xx.xx.xx/id,password;
COPY DATA TABLES (DBTEST),
RELEASE LOCK,
FILE=ARCHIVE;
.logoff;
.exit;
EOC

-------------------------------------------------------------------------------------------------------------------------------------------------------------

3 REPLIES
Apprentice

Re: arcmain COPY DATA from S3 bucket to Teradata AMI on AWS

Hi,

 

Is it possible? Yes if you have the arcmain software installed on your 'cloud' system. If that is the case then your 'filedef' needs to provide a full path to the 'dump.nn.out' file.

 

In general when running a program against Teradata, think in terms of "client" and "server".

The program (Arc) runs on a "client" system and accesses your Teradata system - which is the "server".

On the client you need the program software installed.

To direct the job to the correct "server" system your logon statement needs to identify the server, usually with a dns name or an IP address.

 

On your 'on premise' system does the client where you ran the archive from have access to the internet? Can it connect to your Teradata on AWS system? If so then I'd run arcmain from your on premise client directly into the Teradata on AWS system. No need to 'load the dump file to an S3 bucket'.

 

Does that help?

 

Cheers,

Dave

 

Ward Analytics Ltd - information in motion
www: http://www.ward-analytics.com
Enthusiast

Re: arcmain COPY DATA from S3 bucket to Teradata AMI on AWS

That certainly helps Dave !!!

 

The reason why I use S3 bucket is that the database size is more than 1 Terabyte, so the data is snowballed into S3.

I wasn't sure that the arcmain utility understands the S3 file naming convention -

s3://mybucket/myfolder/myfilename

Again...Thanks for your insight.

 

Enthusiast

Re: arcmain COPY DATA from S3 bucket to Teradata AMI on AWS

Hello Dave,

                  I tried couple of ways to restore the file from S3 bucket and they both fail with the error listed below.

 

Question 1). Which user needs permission to read the S3 bucket.

Question 2). S3 file naming convention in FILEDEF:  Is it s3://bucketname/folder/filename   OR bucketname:/folder/filename

*********************************************************************************************************************************************************************************

08/09/2017 13:17:05  ARCHIVE MAPPED TO
                     bucketname:/test/dump.1843554.out.
08/09/2017 13:17:05  *** Failure ARC0805:Access Module returned error code 4:
                     Requested file not found.
08/09/2017 13:17:05  LOGGED OFF   7 SESSIONS
08/09/2017 13:17:05  ARCMAIN TERMINATED WITH SEVERITY 12

*********************************************************************************************************************************************************************************

08/09/2017 13:28:32  ARCHIVE MAPPED TO
                     s3://bucketname/test/dump.1843554.out.
08/09/2017 13:28:32  *** Failure ARC0805:Access Module returned error code 4:
                     Requested file not found.
08/09/2017 13:28:32  LOGGED OFF   7 SESSIONS
08/09/2017 13:28:32  ARCMAIN TERMINATED WITH SEVERITY 12

*********************************************************************************************************************************************************************************
arcmain SESSIONS=8 CS=UTF8 OUTLOG=copy_02.log FILEDEF='(ARCHIVE,bucketname:/test/dump.1843554.out)'<<EOC
.logon xx.xx.xx.xx/id,password;
COPY DATA TABLES (DBTEST),
RELEASE LOCK,
FILE=ARCHIVE;
.logoff;
.exit;
EOC
*********************************************************************************************************************************************************************************
arcmain SESSIONS=8 CS=UTF8 OUTLOG=copy_02.log FILEDEF='(ARCHIVE,s3://bucketname/test/dump.1843554.out)'<<EOC
.logon xx.xx.xx.xx/id,password;
COPY DATA TABLES (DBTEST),
RELEASE LOCK,
FILE=ARCHIVE;
.logoff;
.exit;
EOC

*********************************************************************************************************************************************************************************

 

Thanks.