On Fri, 2008-12-19 at 11:46 +0800, Daniel wrote: > I backup data in test_laptop folder in my laptop to the server. And I use > another PC to get data back from server, and the folder is named with > test_pc. But rsync is going to create a folder test_laptop in test_pc. I > just wanna everything in test_laptop to be exactly in test_pc.
This indicates that rsync is seeing "test_laptop" as a folder inside the source. If you want that folder mapped directly to the destination, that would typically require appending "test_laptop/" to the source path. > I use following command to back current data to server. > rsync -avzrtopg --progress --delete --backup > --backup-dir=Increment/2000-00-03-180303 > "/cygdrive/d/backup_test/back/test_laptop/" ad...@192.168.2.23::admin_test That's odd: you do have the trailing slash on the source, so that command shouldn't have created a "test_laptop" folder inside the "admin_test" module. But in any case... > And use following command to restore data back to another folder > rsync -avzrtopg --progress ad...@192.168.2.23::admin_test > "/cygdrive/d/backup_test/back/test_pc" Try this: rsync -avzrtopg --progress ad...@192.168.2.23::admin_test/test_laptop/ "/cygdrive/d/backup_test/back/test_pc" -- Matt -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html