HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell/perl script to sync data between remote syst...
Operating System - HP-UX
1826055
Members
4223
Online
109690
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
06-17-2009 03:51 PM
06-17-2009 03:51 PM
Shell/perl script to sync data between remote systems
Hi
I am looking for a solution other than "rsync" to copy files between two systems.
I will be given a file which would contain enteries
---------------------------------------
1. abc 11111 c
2. bbb 22222 d
3. ccc 33333 c
4. ddd 44444 d
So all the columns which say 'c" have to be copied to remote system.
The ones which say "d" have to be deleted and I need to maintain a log of what was done.
rsync is not an option as its slow. Does any one have any ideas how to accomplish this?
Thnks
S
I am looking for a solution other than "rsync" to copy files between two systems.
I will be given a file which would contain enteries
---------------------------------------
1. abc 11111 c
2. bbb 22222 d
3. ccc 33333 c
4. ddd 44444 d
So all the columns which say 'c" have to be copied to remote system.
The ones which say "d" have to be deleted and I need to maintain a log of what was done.
rsync is not an option as its slow. Does any one have any ideas how to accomplish this?
Thnks
S
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2009 04:11 PM
06-17-2009 04:11 PM
Re: Shell/perl script to sync data between remote systems
Hi:
Why not 'rsync' which minimizes traffic by sending only what has changed? It handles deleted files, too.
If you are periodically refreshing an entire directory on a target server, you could craft a script that deletes the directory contents on the target; creates an archived copy of everything in the source directory (e.g. a 'tar'ball) on the source server; transfers the archive to the target server; and installs it there. This can all be done using 'ssh' for security, too.
Otherwise, I have to ask, is this merely an academic exercise?
Regards!
...JRF...
Why not 'rsync' which minimizes traffic by sending only what has changed? It handles deleted files, too.
If you are periodically refreshing an entire directory on a target server, you could craft a script that deletes the directory contents on the target; creates an archived copy of everything in the source directory (e.g. a 'tar'ball) on the source server; transfers the archive to the target server; and installs it there. This can all be done using 'ssh' for security, too.
Otherwise, I have to ask, is this merely an academic exercise?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2009 05:02 PM
06-17-2009 05:02 PM
Re: Shell/perl script to sync data between remote systems
Hello,
As James said, I do not think rsync is a bad
option at all. It looks like your task
might be a school assignment :)
I used it at many commercial companies with
lot of success and throughput was never an
issue (unless your network is saturated
already).
Plus, there are a whole lot of tools to use
with rsync. Some of them are here:
http://unix.freshmeat.net/search/?Go.x=1&Go.y=1&q=rsync§ion=projects
As well, rsync has many options. How are
you using it currently? What are the flags
you use on the command line?
Anyway, if you want some other alternatives:
Commercial software SyncDat:
http://www.dataexpedition.com/syncdat/features.html
Open-source (some of them are for Linux only):
Unison http://www.cis.upenn.edu/~bcpierce/unison/
plsync http://sourceforge.net/projects/plsync/
Zumastor http://www.zumastor.org/
PowerFolder http://sourceforge.net/projects/powerfolder-/
Ruby script:
http://eigenclass.org/hiki/cheap+rsync
WARNING: There is also a commercial product called PowerFolder for Microsoft Windows.
Do not mix it up with the SourceForge
project!
So, if you really want to use some other, plain Shell or Perl script, it is probably
easiest to implement some kind of diff(1)
or and or cmp(1) commands to check if local and remote files are different and if so,
copy a new one.
Cheers,
VK2COT
As James said, I do not think rsync is a bad
option at all. It looks like your task
might be a school assignment :)
I used it at many commercial companies with
lot of success and throughput was never an
issue (unless your network is saturated
already).
Plus, there are a whole lot of tools to use
with rsync. Some of them are here:
http://unix.freshmeat.net/search/?Go.x=1&Go.y=1&q=rsync§ion=projects
As well, rsync has many options. How are
you using it currently? What are the flags
you use on the command line?
Anyway, if you want some other alternatives:
Commercial software SyncDat:
http://www.dataexpedition.com/syncdat/features.html
Open-source (some of them are for Linux only):
Unison http://www.cis.upenn.edu/~bcpierce/unison/
plsync http://sourceforge.net/projects/plsync/
Zumastor http://www.zumastor.org/
PowerFolder http://sourceforge.net/projects/powerfolder-/
Ruby script:
http://eigenclass.org/hiki/cheap+rsync
WARNING: There is also a commercial product called PowerFolder for Microsoft Windows.
Do not mix it up with the SourceForge
project!
So, if you really want to use some other, plain Shell or Perl script, it is probably
easiest to implement some kind of diff(1)
or and or cmp(1) commands to check if local and remote files are different and if so,
copy a new one.
Cheers,
VK2COT
VK2COT - Dusan Baljevic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2009 07:48 PM
06-17-2009 07:48 PM
Re: Shell/perl script to sync data between remote systems
> rsync is not an option as its slow.
Says who? (And that's "it's".)
If you don't like rsync, how _were_ you
planning to copy files to and/or delete files
on the (unspecified) "remote system"?
> Does any one have any ideas how to
> accomplish this?
I might write a shell script to do it. Why
don't you?
Says who? (And that's "it's".)
If you don't like rsync, how _were_ you
planning to copy files to and/or delete files
on the (unspecified) "remote system"?
> Does any one have any ideas how to
> accomplish this?
I might write a shell script to do it. Why
don't you?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP