AW: Re: Copy a directory structure with copying files.

2015-10-09 Thread Peter Hunkeler
I'm sorry for the bad formatting. Trying again



I'm adding some pax options as follows:


a) I want the target to inherit all source attributes:


==> pax -rwE -pe -XCM source target


b) I want the target to keep source attributes, except for ACLs (if an) which 
should be set baset on the target environment's ACLs:


==> pax -rwE -ppx -XCM source target




I like to see what's been copied, therefore the -E option




And don't forget that you may need appropriate rights, depending on what you 
intend to do. E.g. setting extended attributes (APF, program controlles, 
sharelib) require access to BPX.FILEATTR profiles.




 copytree can be much lower than pax. Both are much slower that an IDCAMS 
REPRO, which is my preferred option *if* the part being copied is contained in 
a separate file system.



--
Peter Hunkeler




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


AW: Re: Copy a directory structure with copying files.

2015-10-09 Thread Peter Hunkeler
I'm adding some pax options as follows:
a) I want the target to inherit all source attributes:==> pax -rwE -pe -XCM 
source target
b) I want the target to keep source attributes, except for ACLs (if an) which 
should be set baset on the target environment's ACLs:==> pax -rwE -ppx -XCM 
source target
I like to see what's been copied, therefore the -E option
And don't forget that you may need appropriate rights, depending on what you 
intend to do. E.g. setting extended attributes (APF, program controlles, 
sharelib) require access to BPX.FILEATTR profiles.
 copytree can be much lower than pax. Both are much slower that an IDCAMS 
REPRO, which is my preferred option *if* the part being copied is contained in 
a separate file system.

--
Peter Hunkeler




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Copy a directory structure with copying files.

2015-10-05 Thread Paul Gilmartin
Ok; in my earlier reply I misread the Subject: line, "with copying"
as "without copying".  So:

On 2015-10-05 13:32, Klan, Rob (RET-DAY) wrote:
> 
> An IBMer gave me this process, works great moving USS stuff around.   
> 
> Adjust to your needs. 
>  
> Write it 
> 
> // SET PAX1='sh cd /tmp; pax -wvf'
>
Replace "/tmp" with wherever you really want to start.

> // SET PAX2='./*.*'
>
Beware.  This skips invisible files.  I'd use:

// SET PAX2='.'

> //MAKEIT   EXEC PGM=IEFBR14
> //OUTMVS   DD DSN=CICS.BKUP,
> // DISP=(MOD,KEEP,KEEP),
> // RECFM=U,BLKSIZE=32760,
> // SPACE=(CYL,(100)),
> // UNIT=3390
> //S3  EXEC PGM=BPXBATCH,
> // REGION=0M,
> // PARM='&PAX1 //\''CICS.BKUP\'' &PAX2'
> 
> (xmit/ftp it) 
>  
Shared DASD may eliminate the need for FTP.

> Read it 
> 
> // SET PAX1='sh cd /u/play; pax -rvf'
> // SET PAX2='./test.txt'
>
I believe this will restore only files matching the pattern "test.txt".
Better might be:

// SET PAX2='.'  or even:
// SET PAX2=''

> //S3  EXEC PGM=BPXBATCH,
> // REGION=0M,
> // PARM='&PAX1 //\''CICS.BKUP\'' &PAX2'
>
Read carefully the options concerning restoring timestamps, ownership
and permissions.

> //STDOUT   DD  SYSOUT=*
> //STDERR   DD  SYSOUT=*

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Copy a directory structure with copying files.

2015-10-05 Thread Klan, Rob (RET-DAY)


An IBMer gave me this process, works great moving USS stuff around.   

Adjust to your needs. 

 
Write it 

// SET PAX1='sh cd /tmp; pax -wvf'
// SET PAX2='./*.*'
//MAKEIT   EXEC PGM=IEFBR14
//OUTMVS   DD DSN=CICS.BKUP,
// DISP=(MOD,KEEP,KEEP),
// RECFM=U,BLKSIZE=32760,
// SPACE=(CYL,(100)),
// UNIT=3390
//S3  EXEC PGM=BPXBATCH,
// REGION=0M,
// PARM='&PAX1 //\''CICS.BKUP\'' &PAX2'

(xmit/ftp it) 
 
Read it 

// SET PAX1='sh cd /u/play; pax -rvf'
// SET PAX2='./test.txt'
//S3  EXEC PGM=BPXBATCH,
// REGION=0M,
// PARM='&PAX1 //\''CICS.BKUP\'' &PAX2'
//STDOUT   DD  SYSOUT=*
//STDERR   DD  SYSOUT=*



-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Monday, October 05, 2015 3:12 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Copy a directory structure with copying files.

On Mon, Oct 5, 2015 at 1:42 PM, Dave Crowley  wrote:

> I need to copy a directory structure of a USS (zFS if this matters) 
> from one LPAR to another. I looked at "tar" and "pax" and just can't 
> see a way to do this. I will be changing the high level directory though.
> For example The from directory:
> /usr/local/productV1/*
>

​pax -wf "//'some.ps.file"' /usr/local/productV1/​



>
> To:
> /usr/lpp/productV1/
>

​pax -s#local/lpp/ -rf "//'some.ps.file'"​


​This _should_ work. But I have not tried it. pax can write to a sequential 
data set. I would strongly suggest pre-allocating it with the proper size and 
DCB information (U/23778 is what I use).​



>
> I was hoping to "unPax" to the new directory with the entire directory 
> structure.
>
> Please help a Unix rookie..
>
> Dave Crowley
>
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 

Schrodinger's backup: The condition of any backup is unknown until a restore is 
attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Copy a directory structure with copying files.

2015-10-05 Thread Jack J. Woehr

Jack J. Woehr wrote:

ssh me@myremotesystem:


Don't forget the colon ":"


--
Jack J. Woehr # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a way of skeptically interrogating the universe
www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Copy a directory structure with copying files.

2015-10-05 Thread John McKown
On Mon, Oct 5, 2015 at 1:42 PM, Dave Crowley  wrote:

> I need to copy a directory structure of a USS (zFS if this matters) from
> one LPAR to another. I looked at "tar" and "pax" and just can't see a way
> to do this. I will be changing the high level directory though.
> For example The from directory:
> /usr/local/productV1/*
>

​pax -wf "//'some.ps.file"' /usr/local/productV1/​



>
> To:
> /usr/lpp/productV1/
>

​pax -s#local/lpp/ -rf "//'some.ps.file'"​


​This _should_ work. But I have not tried it. pax can write to a sequential
data set. I would strongly suggest pre-allocating it with the proper size
and DCB information (U/23778 is what I use).​



>
> I was hoping to "unPax" to the new directory with the entire directory
> structure.
>
> Please help a Unix rookie..
>
> Dave Crowley
>
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 

Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Copy a directory structure with copying files.

2015-10-05 Thread Jack J. Woehr

Dave Crowley wrote:

I need to copy a directory structure of a USS (zFS if this matters) from one LPAR to 
another. I looked at "tar"


tar cf mydir.tar mydir
scp mydir.tar me@myremotesystem
ssh me@myremotesystem
tar xf mydir.tar


--
Jack J. Woehr # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a way of skeptically interrogating the universe
www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Copy a directory structure with copying files.

2015-10-05 Thread Paul Gilmartin
On 2015-10-05 13:03, Lester, Bob wrote:
> Hi Dave,
> 
>  HOWD:TSREL:/home/tsrel: man copytree
>   copytree -- Make a copy of a file hierarchy while preserving all file 
> attributes
>  
But that copies the files as well as creating the directories.  How about:

cd source-directory
pax -wf output-file $( find . -type d )  # Beware shell metacharacters in 
pathnames!

> -Original Message-
> From: Dave Crowley
> Sent: Monday, October 05, 2015 12:43 PM
> 
> I need to copy a directory structure of a USS (zFS if this matters) from one 
> LPAR to another. I looked at "tar" and "pax" and just can't see a way to do 
> this. I will be changing the high level directory though.
> For example The from directory:
> /usr/local/productV1/*
> 
> To:
> /usr/lpp/productV1/
> 
> I was hoping to "unPax" to the new directory with the entire directory 
> structure.
> 
> Please help a Unix rookie..

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Copy a directory structure with copying files.

2015-10-05 Thread Jousma, David
Dave,

Be careful.  /usr/lpp is part of the IBM supplied root file system.   You 
should not be making any changes in there outside of smpe.  If you do add 
directories there, it will be on you to carry that forward with future z/OS 
maintenance.

_
Dave Jousma
Assistant Vice President, Mainframe Engineering
david.jou...@53.com
1830 East Paris, Grand Rapids, MI  49546 MD RSCB2H
p 616.653.8429
f 616.653.2717


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Dave Crowley
Sent: Monday, October 05, 2015 12:43 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Copy a directory structure with copying files. [ EXTERNAL ]

I need to copy a directory structure of a USS (zFS if this matters) from one 
LPAR to another. I looked at "tar" and "pax" and just can't see a way to do 
this. I will be changing the high level directory though.
For example The from directory:
/usr/local/productV1/*

To:
/usr/lpp/productV1/

I was hoping to "unPax" to the new directory with the entire directory 
structure.

Please help a Unix rookie..

Dave Crowley



--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

This e-mail transmission may contain information that is proprietary, 
privileged and/or confidential and is intended exclusively for the person(s) to 
whom it is addressed. Any use, copying, retention or disclosure by any person 
other than the intended recipient or the intended recipient's designees is 
strictly prohibited. If you are not the intended recipient or their designee, 
please notify the sender immediately by return e-mail and delete all copies. 
OppenheimerFunds may, at its sole discretion, monitor, review, retain and/or 
disclose the content of all email communications.

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

This e-mail transmission contains information that is confidential and may be 
privileged.   It is intended only for the addressee(s) named above. If you 
receive this e-mail in error, please do not read, copy or disseminate it in any 
manner. If you are not the intended recipient, any disclosure, copying, 
distribution or use of the contents of this information is prohibited. Please 
reply to the message immediately by informing the sender that the message was 
misdirected. After replying, please erase it from your computer system. Your 
assistance in correcting this error is appreciated.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Copy a directory structure with copying files.

2015-10-05 Thread Lester, Bob
Hi Dave,

 HOWD:TSREL:/home/tsrel: man copytree
  copytree -- Make a copy of a file hierarchy while preserving all file 
attributes


  Format

  /samples/copytree [-afos] sourcedir [targetdir]

  Description

  copytree is a REXX sample that enables you to use a number of z/OS UNIX
  capabilities. Included is a recursive routine to descend a hierarchical
  directory. You can also use it to accomplish the following tasks:

  ▒   Retrieve and set attributes for files
  ▒   Read and write files
  ▒   Read and set access control lists (ACLs)

  copytree replicates a source tree starting under the source directory
  within a file system to a target directory. It:

  ▒   Tolerates errors when setting target attributes with messages.

  ▒   Tolerates errors in the source tree, skipping those files.

  ▒   Copies sparse files as sparse files.

  ▒   Handles both symbolic links and external links

  ▒   Does not cross mount points

  ▒   Preserves file links

Thanks!
BobL

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Dave Crowley
Sent: Monday, October 05, 2015 12:43 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Copy a directory structure with copying files. [ EXTERNAL ]

I need to copy a directory structure of a USS (zFS if this matters) from one 
LPAR to another. I looked at "tar" and "pax" and just can't see a way to do 
this. I will be changing the high level directory though.
For example The from directory:
/usr/local/productV1/*

To:
/usr/lpp/productV1/

I was hoping to "unPax" to the new directory with the entire directory 
structure.

Please help a Unix rookie..

Dave Crowley



--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

This e-mail transmission may contain information that is proprietary, 
privileged and/or confidential and is intended exclusively for the person(s) to 
whom it is addressed. Any use, copying, retention or disclosure by any person 
other than the intended recipient or the intended recipient's designees is 
strictly prohibited. If you are not the intended recipient or their designee, 
please notify the sender immediately by return e-mail and delete all copies. 
OppenheimerFunds may, at its sole discretion, monitor, review, retain and/or 
disclose the content of all email communications.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN