SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Sponsor:

Would you like to sponsor this site?
Or buy me a beer?:


Recently Changed Pages:

View All Pages
View All Q Pages


View All Tags


Sign up for Q to post comments.





WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Terms And Conditions for Q users


Pages with comments

PageDateDiscussionTags
2019/05/01 14:08 2 Comments
2019/03/15 16:02 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 3 Comments
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments

aixtar

AIX Tar

TAR File Size Limitation

The tar utility which get installed by default on AIX does not have the possibility to tar/untar files larger than 1 GB. To overcome this install the tar utility that is available on the AIX Toolbox for Linux Applications CD-ROM. I've used tar version 1.14-2 with success.

Simple TAR usage

Create TAR

tar -cvf /scratch/myfile_20030617.tar /scratch/mydir/results/stat/*

Extract Files From TAR

tar -xf myfile_20030617.tar 
  • -c = create
  • -f = read to/from the named file (instead of the device /tape)
  • -t = list contents of .tar file
  • -r = append to a .tar file
  • -v = verbose (tells you everything its doing)
  • -x = extract contents of .tar file
  • -z = compress files (not so useful for minc files)

Use Tar to copy files between servers

To copy a large amount of files to another server you can use tar:

  1. Make sure root is allowed to logon to the new server through ssh
  2. Tar the data and pipe it through ssh to the new server
  3. Check the data sizes and number of files and directories

Root login

Edit the /etc/ssh/sshd_config file on the new server:

PermitRootLogin yes
#AllowGroups ssh-access

and restart the ssh service:

sudo /etc/rc.d/rc2.d/Ssshd stop
sudo /etc/rc.d/rc2.d/Ssshd start

Tar

bash-3.2# tar clf - /opt/IBM/WebSphere | ssh 10.10.10.100 "tar xf - -C /opt/IBM/WebSphere"

root@10.10.10.100's password:
tar: file -C: not present in archive
bash-3.2#

Tar options explanation:

-l
            Writes an error message to standard output for each file with a link count greater than 1 whose
            corresponding links were not also archived. For example, if file1 and file2 are hard-linked together and
            only file1 is placed on the archive, then the -l flag will issue an error message. Error messages are not
            displayed if the -l flag is not specified.


-C Directory
            Causes the tar command to perform a chdir subroutine to the directory specified by the Directory variable.
            Using the -C flag allows multiple directories not related by a close common parent to be archived, using
            short relative path names. For example, to archive files from the /usr/include and /etc directories, you
            might use the following command: tar c -C /usr/include File1 File2 -C /etc File3 File4

Check

Old server:

bash-3.2# du -sm /opt/IBM/WebSphere/
1490.79 /opt/IBM/WebSphere/
bash-3.2# find /opt/IBM/WebSphere/ -type f |wc -l
   16247
bash-3.2# find /opt/IBM/WebSphere/ -type d |wc -l
    2805

New server:

/opt/IBM>sudo du -sm /opt/IBM/WebSphere/
1490.66 /opt/IBM/WebSphere/
/opt/IBM>sudo find /opt/IBM/WebSphere/ -type f |wc -l
   16247
/opt/IBM>sudo find /opt/IBM/WebSphere/ -type d |wc -l
    2805

As you can see there is a small difference between the data size. This is not really a problem because the old server is in use, and there could be differences in block size etc. The amount of files is exactly the same so that is more important.

You could leave a comment if you were logged in.
aixtar.txt · Last modified: 2013/02/25 20:36 by sjoerd