![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| please help in rsync | naree | SUN Solaris | 10 | 1 Week Ago 04:34 AM |
| rsync vs cp | jsy | UNIX for Dummies Questions & Answers | 1 | 03-24-2008 12:51 PM |
| rsync over ftp | Hitori | UNIX for Advanced & Expert Users | 2 | 03-14-2008 09:42 AM |
| rsync in ftp | Euler04 | Shell Programming and Scripting | 5 | 10-24-2005 04:17 AM |
| Rsync | darknite87 | UNIX for Advanced & Expert Users | 1 | 06-06-2002 12:37 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
I want to do rsync only for the difference in the last 30 days. How do I specify the "30 days" on the command line below?
>rsync -avz prj# /rsource /destination Thanks for help |
| Forum Sponsor | ||
|
|
|
||||
|
Well, I'm not an rsync guru, and I don't see
(from the man page) any way to specify a time range to rsync. If you wanted, you could generate a specific list of files to sync to the remote. You could create a script that uses the "find" command using the -mtime option to determine what files have been modified within a given number of days and output this to a file then use this file as a list of files to "sync". As far as scheduling jobs however, cron is "THE" scheduling program for UNIX. For instance, you could execute the shell script that "looks" for files modified in the last 30 days then have the script run rsync. |
|
|||
|
Many thanks, rwb1959.
I set a simple script for one time rsync: #!/bin/sh date /usr/local/bin/rsync -avz /rsource /destination date # --end of script-- I also setup a cron schedule for byweekly rsync jobs: 0 22 1,16 * * /usr/local/bin/rsync -avz /rsource /destination I did some tests. Both worked very well. Thanks again! wz253 |
|||
| Google The UNIX and Linux Forums |