Hello !! I need to sync two folders in fedora linux. One is at /ftp/test/test1 Second is at /ftp/test/test1/test3 I need to sync /ftp/test/test1/test3 that new files uploaded will be seen in /ftp/test/test1 every hour or a day . How do i do that ? Thank YOU ALL ! Tibor Vovcak Slovenia -------------- next part -------------- HTML attachment scrubbed and removed
On May 9, 2005, at 7:09 AM, BASING Tibor Vovcak wrote:> Hello !! > ? > I need to sync two folders in fedora linux. > ? > One??????is at /ftp/test/test1 > Second is at /ftp/test/test1/test3 > ? > I need to sync /ftp/test/test1/test3 that new files uploaded will be > seen in /ftp/test/test1 every hour or a day . > ? > How do i do that ? > ? > Thank YOU ALL ! > ? > Tibor Vov?ak >tibor, run this script in cron 00 * * * * rsync -aucz /ftp/test/test1/ /ftp/test/test1/test3/ this will sync test1 to test3 every hour. ax :-) Tony Alexander System Administrator Center for Biodiversity and Conservation American Museum of Natural History Central Park West at 79th Street New York, NY 10024 Phone: 212 496 3474 Fax: 212 769 5292 Mobile: 917 548 0560 http://cbc.amnh.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1093 bytes Desc: not available Url : http://lists.samba.org/archive/rsync/attachments/20050509/10ee9fca/attachment.bin
Hi Tibor, crontab -e Make an entry: 0 * * * * /usr/bin/rsync -av /ftp/test/test1/ /ftp/test/test1/test3/ # Means 0 minutes every hour every day... and so on -> man cron Save and exit... Lars Am Montag, den 09.05.2005, 13:09 +0200 schrieb BASING Tibor Vovcak:> Hello !! > > I need to sync two folders in fedora linux. > > One is at /ftp/test/test1 > Second is at /ftp/test/test1/test3 > > I need to sync /ftp/test/test1/test3 that new files uploaded will be > seen in /ftp/test/test1 every hour or a day . > > How do i do that ? > > Thank YOU ALL ! > > Tibor Vov?ak > Slovenia > -- > To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
BASING Tibor Vovcak wrote:> Hello !! > > I need to sync two folders in fedora linux. > > One is at /ftp/test/test1 > Second is at /ftp/test/test1/test3 > > I need to sync /ftp/test/test1/test3 that new files uploaded will be > seen in /ftp/test/test1 every hour or a day . > > How do i do that ?I admit I may be misunderstanding the purpose here but, from your description, it sounds lke you're setting up an hourly mirror of /ftp/test/test1/test3 in /ftp/test/test1 The command line: rsync -av /ftp/test/test1/test3/* /ftp/test/test1/ Should be all you need to do, but it depends on how the folders are structured. If you have a folder called /ftp/test/test1/test3/test3 then the above command line would likely break horribly. Can I ask why you want to mirror the contents of a folder into its own parent folder? Terry.>Thank YOU ALL !> > Tibor Vov?ak > Slovenia >
> run this script in cron> 00 * * * * rsync -aucz /ftp/test/test1/ /ftp/test/test1/test3/Beware: 1. This will create the first time: /ftp/test/test1/test3/test3, then /ftp/test/test1/test3/test3/test3 the second time and so on till filling up the disk. It would be better to *not* have one of the implied directories to be a subdir of the other. 2. Tibor meant a sync from test3 to test1 -- Francis.Montagnac@sophia.inria.fr, Tel: (33) 04 92 38 79 11, Bur: C112 INRIA Sophia, 2004, rte des Lucioles, B.P.93 - 06902 Sophia Antipolis Cedex