copying recently edited files server to server
news_at_celticbear.com
Date: 11/18/05
- Next message: William Poaster: "Re: Good-Bye rr.com"
- Previous message: Tauno Voipio: "Re: Good-Bye rr.com"
- Next in thread: John-Paul Stewart: "Re: copying recently edited files server to server"
- Reply: John-Paul Stewart: "Re: copying recently edited files server to server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Nov 2005 11:39:44 -0800
I need to copy all the files created and edited in the last day to a
new server.
scp is possible, as is rsync through ssh, but a pasword challenge is
used every time they're used. And I know you can disable that by using
shared keys, but I'm afraid I have a deadline that learning how to do
that hinders.
My options are to somehow open up one rsync from the new server and
feed it the find command to bring back those files, or add the files in
question to a tar on the older server and then bring the tar over at
one time from the new.
This is what I've been using on the new server to bring files over:
rsync -avz -e ssh (old server).com:/var/www/html/home/ ./
which works beautifully!
Except I can't figure out how to use it with a date condition.
Looking at the "find" man, I see an -exec switch, but then I remembered
that I'm looking for the newer files on the old server, so I'm thinking
I need to run the find from there.
So reading the "find" man I figure out how to find the files, and so I
tried to send them to a tar with:
tar uzvf ./archive.tar `find /var/www/html/home/ -type f -mtime -1
-print`
But u and r (even with a previously created tar) just throws me a
tar: Cannot update compressed archives
tar: Error is not recoverable: exiting now
If someone could just let me know which direction to take this, I can
figure it out. Can I initiate an rsync from the new and somehow send it
the find command to bring in the newer files (best way) or is there a
way to run the find on the old and run a transfer of the found file
unattended, or add the new files to one tar?
Just to test I ran:
gzip `find /var/www/html/home/ -type f -mtime -1 -print`
and that worked great... by zipping up each file where it sits. =)
And any attempt to use a command in the find with -exec sends me:
find: missing argument to `-exec'
Thanks for any help!
-Liam
- Next message: William Poaster: "Re: Good-Bye rr.com"
- Previous message: Tauno Voipio: "Re: Good-Bye rr.com"
- Next in thread: John-Paul Stewart: "Re: copying recently edited files server to server"
- Reply: John-Paul Stewart: "Re: copying recently edited files server to server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|