- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: hp-ux rsync copy help .
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-01-2009 12:36 PM
тАО12-01-2009 12:36 PM
hp-ux rsync copy help .
I have few filesystem like this:
/oracle/app/STW
/oracle/app/DTW
/oracle/arch
/oracle
I want to copy using rsync command to another archive directory:
Example:
# rsync -avz /oracle/app/STW/ /arch_dir/oracle_app_STW/
# rsync -avz /oracle/app/DTW/ /arch_dir/oracle_app_STW/
# rsync -avz /oracle /arch_dir/oracle/
Now /arch_dir/oracle/ may be get copied everything under /oracle from source including app and so on...,
So the question is how to tell rsync to copy only mount point data and not to cross mount points. Like we use -xdev with find command.
HP-UX version:
* hpux 11.00
* rsync version 2.5.5 protocol version 26
Please advise ,
Thanks in advance.
- Tags:
- rsync
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-01-2009 01:02 PM
тАО12-01-2009 01:02 PM
Re: hp-ux rsync copy help .
# rsync -avz /oracle /arch_dir/oracle/
where everthing under "/oracle" gets sent?
as far as I know, there isn't anything like find's xdev, however, it appears you have to provide the "-r" option to have rsync recurse into the directories under oracle. In other words, the command, as illustrated above, will *not* sync anything other than the files immediately under "oracle"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-01-2009 03:18 PM
тАО12-01-2009 03:18 PM
Re: hp-ux rsync copy help .
Thanks, However: you mentioned it will not copy any subdirectory, and need to use -r. is incorrect.
-a option in rsync does everything. (It does recursive as well, and preserves permissions ). So no worry on that part.
> # rsync -avz /oracle /arch_dir/oracle/
where everthing under "/oracle" gets sent?
Yes this is the worry , only I want the Filesystem data to be copied, not other FS on top of /oracle .
Looking for something some switch that does similar to xdev with find.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-01-2009 04:07 PM
тАО12-01-2009 04:07 PM
Re: hp-ux rsync copy help .
-a option in rsync does everything. (It does recursive as well, and preserves permissions ). So no worry on that part."
You missed the point. You can't stop it from crossing mount points, so you probably can't use "-a" as you've illustrated.
=========
from the man page:
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
=========
Thus, your example of:
rsync -avz /oracle /arch_dir/oracle/
would become:
rsync -ptgoDvz /oracle /arch_dir/oracle/
Which stops the recursion, copying only the files directly under /oracle to /arch_dir/oracle
you would then need to specify any sudirectories that you do want copied as separate items, much as you do with
# rsync -avz /oracle/app/STW/ /arch_dir/oracle_app_STW/
# rsync -avz /oracle/app/DTW/ /arch_dir/oracle_app_STW/
Either that, or you'll have to look into "excludes" (which may or may not exclude entire trees)
"Yes this is the worry , only I want the Filesystem data to be copied, not other FS on top of /oracle . Looking for something some switch that does similar to xdev with find."
Again, rsync doesn't care about filesystems / mount points and thus does not have anything analogous to "find"s "-xdev" option. Its all based on file and directory names. You can't have "-a" and be assured that it *won't* follow a mount point......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2009 10:04 PM
тАО12-03-2009 10:04 PM
Re: hp-ux rsync copy help .
Thanks,
As you mentioned ,
rsync -ptgoDvz /oracle /arch_dir/oracle/
Which stops the recursion, copying only the files directly under /oracle to /arch_dir/oracle
copying only the files directly under /oracle
Suppose If I have 100's of directory under /oracle (Filesystem) with subdir, then wouldn't it be difficult to copy them one by one.
The requirement is here I dont want to cross mount point and to copy everying withing the filesystem to another place.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-16-2013 04:08 AM
тАО09-16-2013 04:08 AM
Re: hp-ux rsync copy help .
Hi all,
i want files when any new files is generated in source system, i don't want old files should be in sync,
i used command like same,
rsync -a -z <source> <destination>.
Now the issue is ,
For ex,..
Source system, Destination sys
Log_1 to Log_50 Log_1 to Log_50
If i deleted Log_1 to Log_30 in destination side, because of less space,
It should not copy again from the source system from Log_1 to Log_30,
i need file if any new file generated in source system ex, Log_51 is generated means only that should come in Destination system,
For ex,..
Source system, Destination sys
Log_1 to Log_51 Log_31 to Log_51
But what i am receiving in destination system,
First this old files is coming Log_1 to Log30 after that only Log_51 is coming.
Kindly suggest..
Jagan