cancel
Showing results for 
Search instead for 
Did you mean: 

Create a TAR file in XI?

Shabarish_Nair
Active Contributor
0 Kudos

Hi All,

One of our client requirement is to create a tar file as the output.

The payloadzipbean creates a zip file. Is there any standard way to create a tar file?

If there isnt, is there an alternative?

Regards,

Shabarish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shabarish,

I am not sure if there is a standard way, but one way would be to execute a script at the end of the processing.

In the script, use tar command to create tar file of the required files.

Thanks,

Swapna

Shabarish_Nair
Active Contributor
0 Kudos

Note: We are exchanging files via FTPS.

I had the script in my mind. But this is what my understanding would be.

1. Script - Running at local site

i.e to execute the script within the network. It would mean to introduce another interface to then pick up the tar file and then send it to the target. From a production support perspective, getting it approved is close to impossible (This is my last option)

2. Execute Script at target site

i.e on the target FTP server. Not possible because the end system is not willing to provide any kind of authorization other than writing the file to the server.

thanks for the input. Are you aware of doing this via a custom module?

prateek
Active Contributor
0 Kudos

Hi Shabarish,

You may use the code below to create the tar file

http://www.java2s.com/Code/Java/File-Input-Output/TapeArchiveListerTarfile.htm

Regards,

Prateek

Former Member
0 Kudos

Dude~

Writing a code snippet from the JAVA engine for this is a overkill..Suggest that you create a Perl/Unix shell script depending on the scheduling reqmt and let the OS/Tar utility handle this.offcourse u need to take care of the push/pop from the specific FTP folder concerned and ensure you avoid creating any ZERO size files.But thats standard activity.

Regards

Sriram Vasudevan.

Shabarish_Nair
Active Contributor
0 Kudos

Hey all,

Let me take some time out and evaluate the different solutions.

Will get back and update this post from what will be optimum for this particular scenario.

thanks,

Shabz

santhosh_kumarv
Active Contributor
0 Kudos

Hi Shabz,

I guess it is feasabel to write a script that will both convert the file to tar file and do a FTP transfer to the target system. You may execute this script every time a file is created thru the receiver channel.

By this way you can avoid having an additional scenario to transfer the TAR file.

Thanks

SaNv...

Shabarish_Nair
Active Contributor
0 Kudos

> Hi Shabz,

>

> I guess it is feasabel to write a script that will both convert the file to tar file and do a FTP transfer to the target system. You may execute this script every time a file is created thru the receiver channel.

> By this way you can avoid having an additional scenario to transfer the TAR file.

>

> Thanks

> SaNv...

Hi Santhosh,

In this particular case, to have the same script do the FTP is not a good idea because;

a. It is FTPS

b. The password for the target keeps changing every month - means modifying the script in PRD

c. To monitor for the FTP of the files via the script is a pain point. The support team will require to now check in a different location for this, losing out on the central monitoring concept of XI

Thanks for you input still, appreciate it !!!

Regards,

Shabz

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vijayakumar,

TAR stands for Tape Archive.

file format in the form of a type of archive bitstream and the name of the program used to handle such files. Initially developed as a raw format, used for tape backup and other sequential access devices for backup purposes, it is now commonly used to collate collections of files into one larger file, for distribution or archiving, while preserving file system information such as user and group permissions, dates, and directory structures.

kindly chk in wikipedia to get more clear idea

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hi Vijayakumar,

>

>

> TAR stands for Tape Archive.

>

> file format in the form of a type of archive bitstream and the name of the program used to handle such files. Initially developed as a raw format, used for tape backup and other sequential access devices for backup purposes, it is now commonly used to collate collections of files into one larger file, for distribution or archiving, while preserving file system information such as user and group permissions, dates, and directory structures.

>

> kindly chk in wikipedia to get more clear idea

Thanks for the post.

I am aware of what TAR format is about. The issue is how to create such an archive via XI.

Shabarish_Nair
Active Contributor
0 Kudos

Bring to Front