View previous topic :: View next topic
|
Author |
Message |
autobox
New User
Joined: 19 Aug 2005 Posts: 51
|
|
|
|
Hi all,
I tried to backup USS (OMVS) files using tar command but failed to restore.
1. tar -zxvf to pack a directory to a tar.Z file
2. FTP to get tar.Z file from USS to PC in binary
3. FTP to put tar.Z file from PC to another z/OS USS in binary
4. uncompress tar.Z to tar
5. tar -xvf tar got below error:
tar: FSUM8842 codeset translation initialization: EDC5121I Invalid argument.
Anything wrong in my process? Or there is other way better to do the same thing?
Thanks in advance! |
|
Back to top |
|
|
SPACHFR
New User
Joined: 07 Mar 2006 Posts: 5 Location: France
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
I don't think you're specifying the options correctly. From the Unix System Services Command Reference manual:
Quote: |
The four forms of the command shown in the syntax represent the main functions of tar as follows:
–c
Creates an archive. Each named file is written into a newly created archive. Directories recursively include all components. Under the USTAR (–U) option, tar records directories and other special files in the tape archive; otherwise, it ignores such files. If – appears in place of any file name, tar reads the standard input for a list of files one per line. This allows other commands to generate lists of files for tar to archive.
Tip: In order to preserve information about extended attributes and external links, the USTAR format (-U) must be used. Additionally, to preserve ACLs, file tag information, and link names greater than 100 characters, the USTAR format (-U) and -X option must be used. The OS390 archive format can also be used with the -S option to store all the file attributes.
–r
Writes the named files to the end of the archive. It is possible to have more than one copy of a file in a tape archive using this method. To use this form of the command with a tape, it must be possible to backspace the tape. Do not specify OS390 format to be appended to non-OS390 format archive or specify non-OS390 format to be appended to OS390 format archive.
Restriction: You cannot specify both the –r and the –z option at the same time.
–t
Displays a table of contents. This option displays the names of all the files in the archive, one per line. If you specify one or more files on the command line, tar prints only those file names. The verbose (-v) option can be used to show the attributes of each component. For USTAR or OS390 format archives, the -L E option can be used to show the attributes and extended attributes of each component.
–x
Extracts files from an archive. tar extracts each named file to a file of the same name. If you did not specify any files on the command line, all files in the archive are extracted. This extraction restores all file system attributes as controlled by other options. |
I think the first tar should be -c not -x. |
|
Back to top |
|
|
autobox
New User
Joined: 19 Aug 2005 Posts: 51
|
|
|
|
Hi SPACHFR, you are correct about the root cause and the fix.
Hi Robert, you are correct about the tar option.
Thanks again! |
|
Back to top |
|
|
|