- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script 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
Forums
Discussions
Discussions
Discussions
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
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
03-27-2006 06:52 AM
03-27-2006 06:52 AM
Script help
I need help to made a script that copy to one server to a other some file, but only ineed copy only the new ones. no all files
who can do that with out copy all files ?
example:
srv1 /tmp/data1, data2 etc.. copy svr2 /tmp/data2 the data2 is data new for this day
Thank You !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2006 06:55 AM
03-27-2006 06:55 AM
Re: Script help
cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2006 07:01 AM
03-27-2006 07:01 AM
Re: Script help
Here's how I sync /home/bwpadm user to DR site:
From cron:
15 01 * * * /app/admin/drp/update-binaries.sh >/tmp/update-binaries.cron 2>&1
#! /bin/sh
# Keep the DRP copy of the bwpadm up-to-date.
# Currently the files are in:
#
# /home/bwpadm/DR
#
# See the rdist(1M) distfile for a list of exclusions.
DRPDIR=/app/admin/drp
DRPHOST=svr102
HOST=`/usr/bin/uname -n`
mount | grep /home > /dev/null 2>&1
if [ $? -eq 0 ]
then
/usr/sbin/vgexport -p -s -v -m /home/bwpadm/DR/vg10.map /dev/vg10
( su - bwpadm -c "rdist -f $DRPDIR/distfile bwpadm"; ) 2>&1 |\
tee $DRPDIR/drp.log 2>&1 |\
mailx -s "bwpadm DRP rdist output" sysadm
fi
# cat /app/admin/drp/distfile
BWPDR = ( svr102 )
#
# File systems to be copied over to the DR host.
# Don't use -R in install - so as not to remove files on destination host
BWPADM = /home/bwpadm
bwpadm: ( ${BWPADM} ) -> ( ${BWPDR} )
install -w ;
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2006 08:35 PM
03-27-2006 08:35 PM
Re: Script help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2006 08:39 PM
03-27-2006 08:39 PM
Re: Script help
Or else write a script to find files which are new today and put into a file called /tmp/files2copy-svr2.
First copy the file and then get the files available in that file.
Else use rsync for this.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2006 09:00 PM
03-27-2006 09:00 PM
Re: Script help
you can use the find command with -ctime, -mtime, atime parameters then copy it to the other server using scp/rcp/ftp/sftp etc...
your command would look like this.
find /tmp -name "data?" -mtime +1 -exec scp {} user@svr2:/tmp/{} \};
good luck ..hope this helps..