Re: Help with correct text file syntax EXCLUDE/INCLUDE + OPTION
Yan, I might be tired from repeated tries. It still fail. m...@fmv:~$ rsync -rvt --include-from=rsyncfinal /home /home/rsynctest sending incremental file list [sender] hiding directory home because of pattern ** delta-transmission disabled for local transfer or --whole-file total: matches=0 hash_hits=0 false_alarms=0 data=0 sent 10 bytes received 12 bytes 44.00 bytes/sec total size is 0 speedup is 0.00 On Thu, 2010-01-21 at 11:26 +0200, Yan Valuyskiy wrote: > You are right it was my mistake , use --include-from = FILENAME > > On Thu, Jan 21, 2010 at 11:19 AM, nomnex wrote: > I can not get it to work > > http://pastebin.com/f432bf596 > > > > On Thu, 2010-01-21 at 18:05 +0900, nomnex wrote: > > On Thu, 2010-01-21 at 09:55 +0200, Yan Valuyskiy wrote: > > > > > I believe for this you'll have to provide a kind of next > include file > > > with --files-include option: > > > > Thank you. What is the full string for the [OPTION > "--file-include > > option"], saying the file name below is "rsync.list". > > > > My understanding was --files-from = no +/- (only folder/file > paths), and > > --exclude-from/include-from = +/- > > > > > ! > > > + /Documents/** > > > + /Software/** > > > + /.evolution/addressbook/local/system/addressbook.db > > > + /.evolution/calendar/local/system/calendar.ics > > > + /.evolution/memos/local/system/journal.ics > > > + /.evolution/tasks/local/system/tasks.ics > > > - ** > > > - * > > > > > > + /NAME/** > > > tells to replicate a folder from $SRC path AND all its > content > > > whatever it is going to be > > > > > > > > > + /.evolution/addressbook/local/system/addressbook.db > > > tells to replicate exact file > > > > > > > > > - ** will skip all other folders in any location > > > - * will skip any file in any location > > > > > > Thnx, > > > Yan > > > > > > On Thu, Jan 21, 2010 at 9:40 AM, nomnex > wrote: > > >Hi, > > > Linux-Ubuntu here. English is not my first > language. The man > > > rsync is > > > difficult to understand. I want to backup some > folders > > > recursively and > > > some files, see [1] in my /home dir to an external > USB HD > > > (Ext4). I want > > > to use a text file for the purpose. > > > > > > [1] > > > /home/user/Documents > > > /home/user/Software > > > > > > > /home/user/.evolution/addressbook/local/system/addressbook.db > > > > /home/user/.evolution/calendar/local/system/calendar.ics > > > > /home/user/.evolution/memos/local/system/journal.ics > > > /home/user.evolution/tasks/local/system/tasks.ics > > > > > > > > > First (1st) attempt > > > > > > [OPTION] --exclude-from=fileA > > > > > > [SYNTAX] fileA > > > > > > + Documents > > > + Documents/** > > > + Software > > > + Software/** > > > # > > > .evolution/addressbook/local/system/addressbook.db > > > .evolution/calendar/local/system/calendar.ics > > > .evolution/memos/local/system/journal.ics > > > .evolution/tasks/local/system/tasks.ics > > > # > > > - * > > > > > > Output: Documents & Software folders: > PASS. .evolution files: > > > FAIL > > > > > > > > > Second (2nd) attempt > > > > > > [OPTION] --files-from=fileB > > > > > >
Re: Help with correct text file syntax EXCLUDE/INCLUDE + OPTION
I can not get it to work http://pastebin.com/f432bf596 On Thu, 2010-01-21 at 18:05 +0900, nomnex wrote: > On Thu, 2010-01-21 at 09:55 +0200, Yan Valuyskiy wrote: > > > I believe for this you'll have to provide a kind of next include file > > with --files-include option: > > Thank you. What is the full string for the [OPTION "--file-include > option"], saying the file name below is "rsync.list". > > My understanding was --files-from = no +/- (only folder/file paths), and > --exclude-from/include-from = +/- > > > ! > > + /Documents/** > > + /Software/** > > + /.evolution/addressbook/local/system/addressbook.db > > + /.evolution/calendar/local/system/calendar.ics > > + /.evolution/memos/local/system/journal.ics > > + /.evolution/tasks/local/system/tasks.ics > > - ** > > - * > > > > + /NAME/** > > tells to replicate a folder from $SRC path AND all its content > > whatever it is going to be > > > > > > + /.evolution/addressbook/local/system/addressbook.db > > tells to replicate exact file > > > > > > - ** will skip all other folders in any location > > - * will skip any file in any location > > > > Thnx, > > Yan > > > > On Thu, Jan 21, 2010 at 9:40 AM, nomnex wrote: > >Hi, > > Linux-Ubuntu here. English is not my first language. The man > > rsync is > > difficult to understand. I want to backup some folders > > recursively and > > some files, see [1] in my /home dir to an external USB HD > > (Ext4). I want > > to use a text file for the purpose. > > > > [1] > > /home/user/Documents > > /home/user/Software > > > > /home/user/.evolution/addressbook/local/system/addressbook.db > > /home/user/.evolution/calendar/local/system/calendar.ics > > /home/user/.evolution/memos/local/system/journal.ics > > /home/user.evolution/tasks/local/system/tasks.ics > > > > > > First (1st) attempt > > > > [OPTION] --exclude-from=fileA > > > > [SYNTAX] fileA > > > > + Documents > > + Documents/** > > + Software > > + Software/** > > # > > .evolution/addressbook/local/system/addressbook.db > > .evolution/calendar/local/system/calendar.ics > > .evolution/memos/local/system/journal.ics > > .evolution/tasks/local/system/tasks.ics > > # > > - * > > > > Output: Documents & Software folders: PASS. .evolution files: > > FAIL > > > > > > Second (2nd) attempt > > > > [OPTION] --files-from=fileB > > > > [SYNTAX] fileB > > > > Documents > > Software > > # > > .evolution/addressbook/local/system/addressbook.db > > .evolution/calendar/local/system/calendar.ics > > .evolution/memos/local/system/journal.ics > > .evolution/tasks/local/system/tasks.ics > > > > Output: Documents & Software folders: PASS .evolution files: > > FAIL > > > > > > QUESTIONS > > > > What is the correct syntax of the text file > > What is the correct option to use > > What is the difference between --exclude-from vs include-from > > vs. > > --files-from > > > > I am thankful if you can provide easy to grasp examples and > > explanations. > >Bye, > >nomnex > > > > -- > > 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 > > > > -- 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
Re: Help with correct text file syntax EXCLUDE/INCLUDE + OPTION
On Thu, 2010-01-21 at 09:55 +0200, Yan Valuyskiy wrote: > I believe for this you'll have to provide a kind of next include file > with --files-include option: Thank you. What is the full string for the [OPTION "--file-include option"], saying the file name below is "rsync.list". My understanding was --files-from = no +/- (only folder/file paths), and --exclude-from/include-from = +/- > ! > + /Documents/** > + /Software/** > + /.evolution/addressbook/local/system/addressbook.db > + /.evolution/calendar/local/system/calendar.ics > + /.evolution/memos/local/system/journal.ics > + /.evolution/tasks/local/system/tasks.ics > - ** > - * > > + /NAME/** > tells to replicate a folder from $SRC path AND all its content > whatever it is going to be > > > + /.evolution/addressbook/local/system/addressbook.db > tells to replicate exact file > > > - ** will skip all other folders in any location > - * will skip any file in any location > > Thnx, > Yan > > On Thu, Jan 21, 2010 at 9:40 AM, nomnex wrote: >Hi, > Linux-Ubuntu here. English is not my first language. The man > rsync is > difficult to understand. I want to backup some folders > recursively and > some files, see [1] in my /home dir to an external USB HD > (Ext4). I want > to use a text file for the purpose. > > [1] > /home/user/Documents > /home/user/Software > > /home/user/.evolution/addressbook/local/system/addressbook.db > /home/user/.evolution/calendar/local/system/calendar.ics > /home/user/.evolution/memos/local/system/journal.ics > /home/user.evolution/tasks/local/system/tasks.ics > > > First (1st) attempt > > [OPTION] --exclude-from=fileA > > [SYNTAX] fileA > > + Documents > + Documents/** > + Software > + Software/** > # > .evolution/addressbook/local/system/addressbook.db > .evolution/calendar/local/system/calendar.ics > .evolution/memos/local/system/journal.ics > .evolution/tasks/local/system/tasks.ics > # > - * > > Output: Documents & Software folders: PASS. .evolution files: > FAIL > > > Second (2nd) attempt > > [OPTION] --files-from=fileB > > [SYNTAX] fileB > > Documents > Software > # > .evolution/addressbook/local/system/addressbook.db > .evolution/calendar/local/system/calendar.ics > .evolution/memos/local/system/journal.ics > .evolution/tasks/local/system/tasks.ics > > Output: Documents & Software folders: PASS .evolution files: > FAIL > > > QUESTIONS > > What is the correct syntax of the text file > What is the correct option to use > What is the difference between --exclude-from vs include-from > vs. > --files-from > > I am thankful if you can provide easy to grasp examples and > explanations. >Bye, >nomnex > > -- > 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 > -- 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
Help with correct text file syntax EXCLUDE/INCLUDE + OPTION
Hi, Linux-Ubuntu here. English is not my first language. The man rsync is difficult to understand. I want to backup some folders recursively and some files, see [1] in my /home dir to an external USB HD (Ext4). I want to use a text file for the purpose. [1] /home/user/Documents /home/user/Software /home/user/.evolution/addressbook/local/system/addressbook.db /home/user/.evolution/calendar/local/system/calendar.ics /home/user/.evolution/memos/local/system/journal.ics /home/user.evolution/tasks/local/system/tasks.ics First (1st) attempt [OPTION] --exclude-from=fileA [SYNTAX] fileA + Documents + Documents/** + Software + Software/** # .evolution/addressbook/local/system/addressbook.db .evolution/calendar/local/system/calendar.ics .evolution/memos/local/system/journal.ics .evolution/tasks/local/system/tasks.ics # - * Output: Documents & Software folders: PASS. .evolution files: FAIL Second (2nd) attempt [OPTION] --files-from=fileB [SYNTAX] fileB Documents Software # .evolution/addressbook/local/system/addressbook.db .evolution/calendar/local/system/calendar.ics .evolution/memos/local/system/journal.ics .evolution/tasks/local/system/tasks.ics Output: Documents & Software folders: PASS .evolution files: FAIL QUESTIONS What is the correct syntax of the text file What is the correct option to use What is the difference between --exclude-from vs include-from vs. --files-from I am thankful if you can provide easy to grasp examples and explanations. Bye, nomnex -- 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
RE: --include option
On Wed, 14 Aug 2002, Wayne Davison wrote: > In a combined file, items that begin with "+ " are always taken to be > exclusions Of course, that should have been "inclusions", not "exclusions". ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
RE: --include option
On Tue, 13 Aug 2002, Leaw, Chern Jian wrote: > I tried your suggestion, but did not work. It still copied the entire > filesystem across to the destination machine. Since you failed to provide the command-line you're using, I can't tell you exactly why your command failed. For instance, if you use a trailing slash on the sending-side directory you'd specify the exclusions differently than if the slash was not there. It's fairly easy to figure out for yourself what your inclusion & exclusion lists should look like by first running the command with the -n option (which tells rsync not to actually copy any files). The names that rsync outputs are the names you need to match (just add a slash to the start of the name). Once you get familiar with rsync you'll be able to predict what these names will be, but until then, using -n lets you ask rsync for the answer. As a rule, all names specified before a slash in the sending filename are eliminated from the name when matched against the include/exclude names. It is also sometimes useful to add an extra -v option to the command to see what is getting included or excluded. Another thing I recommend is that you use a "root slash" with names that don't need to float to any level. For instance, if you just specify "foo" as an exclusion, it will exclude that directory OR file at any point in the tree. Specifying "/foo" (or "/sub/foo") is thus safer since it protects against unintended matching. I also prefer a single combined include/exclude file since it is easier to edit and lets you order the inclusions and exclusions (remember that the first matching pattern is the one that is acted upon, so sometimes order does matter). In a combined file, items that begin with "+ " are always taken to be exclusions, and items that being with "- " are always taken to be exclusions. You can leave off the "+ " in an include file (and the "- " in an excluded file), but I included both for completeness. So, with a file named "myinc" that has these 3 lines in it: + /clock_speed + /fub_layout - /* using this command: rsync -avz --include-from=myinc /stor/circuit_design/ mickey.willowglen.com:/stor/circuit_design does not work for you, then I am misunderstanding something about your setup. ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: --include option
Hi Leaw Follow the following steps 1) Make the file "includelist" and "excludelist" in any directory for example in: /rs/ 2) Make entries of all the Directories as follows in "includelist" (the files to be included) clock_speed dir1 dir4 dir5 3) Make entries of all the Directories as follows in "excludelist" (the files to be excluded) dir2 dir3 dir6 I tried * in this case.. but this excludes all.. because include and exclude works in conjunction. 4) give the command as: "rsync -avz --progress --include-from=/rs/includelist --exclude-from=/rs/excludelist ... rest command follows.. please let me know the result after running this way... Nitin "Leaw, Chern Jian" wrote: > Hi Nitin, > > How should I include the patterns to be included for the > --include-from=include_list? I've tried the method suggested from Wayne, but > could not work. > > I've also tried having the --exclude-from=exclude-list in use together with > the --include-from=include_list, but seems to me that the > --exclude-from=exclude_list is doing the trick in excluding those dirs/files > and hence transferring the remaining files over. This seems true when I > excluded the --exclude-from=exclude-list option, and only have the > --include-from=include_list specified, it ended up transferring the entire > files across. > > I tried having the following for the file to be specified in the > --include-from option: > > + /*/clock_speed > > + /*/fub_layout > > - /* > > > > AND > > + circuit_design/clock_speed > > + circuit_design/fub_layout > > - /* > > > > AND > > + /stor/circuit_design/clock_speed > > + /stor/circuit_design/fub_layout > > - /* > > > AND > > + /clock_speed > > + /fub_layout > > - /* > > Could you please help me out? > > Thanks. > > -Original Message- > From: Nitin Agarwal [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 14, 2002 3:49 PM > To: Leaw, Chern Jian > Cc: 'Wayne Davison'; '[EMAIL PROTECTED]' > Subject: Re: --include option > > Rather u can make two files, name the first one as includelist and second > one as > exclude list. > Make entries of all the files u want to include in rsync in file > "includelist" and > entries of files to be excluded in "excludelist". > > then give the command: > rsync -avz .. --include-from=includelist --exclude-from=excludelist > ...rest command continues > > This will work well.. > > If anybody has faced any problems in doing the synchronisation this way, > please let > me know, so that i can be prepared for them.. > > :-) > > Nits > > "Leaw, Chern Jian" wrote: > > > Hi Wayne, > > > > I tried your suggestion, but did not work. It still copied the entire > > filesystem across to the destination machine. > > I tried having the following: > > + /*/clock_speed > > + /*/fub_layout > > - /* > > > > AND > > + circuit_design/clock_speed > > + circuit_design/fub_layout > > - /* > > > > AND > > + /stor/circuit_design/clock_speed > > + /stor/circuit_design/fub_layout > > - /* > > > > Could you explain to me the idea of having the +, -, and /* ? Do the > number > > of /* indicate the subdirectory levels before arriving at the directory to > > include? > > > > The other alternative you suggested below works well: > > rsync -avz /stor/circuit_design/{clock_speed,fub_layout} > > mickey.willowglen.com:/stor/circuit_design/ > > > > But I would like to have these include list into a file, as I'd be having > > many other sub-directories to include, yet exclude. > > > > Appreciate it if you could help me out. > > > > Thanks. > > > > -Original Message- > > From: Wayne Davison [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, August 13, 2002 12:57 AM > > To: Leaw, Chern Jian > > Cc: '[EMAIL PROTECTED]' > > Subject: Re: --include option > > > > On Mon, 12 Aug 2002, Leaw, Chern Jian wrote: > > > # rsync -avz --include-from=files_included /stor/circuit_design/ > > > mickey.willowglen.com:/stor/circuit_design/ > > > > The problem with your command is that it contains include directives but > > no exclusions, so nothing limits the default operation of sending the > > entire subdirectory contents. An easier way to go for this specific > > problem is to ignore includes and specify two source dirs, like this: > > > >
RE: --include option
Hi Nitin, How should I include the patterns to be included for the --include-from=include_list? I've tried the method suggested from Wayne, but could not work. I've also tried having the --exclude-from=exclude-list in use together with the --include-from=include_list, but seems to me that the --exclude-from=exclude_list is doing the trick in excluding those dirs/files and hence transferring the remaining files over. This seems true when I excluded the --exclude-from=exclude-list option, and only have the --include-from=include_list specified, it ended up transferring the entire files across. I tried having the following for the file to be specified in the --include-from option: > + /*/clock_speed > + /*/fub_layout > - /* > > AND > + circuit_design/clock_speed > + circuit_design/fub_layout > - /* > > AND > + /stor/circuit_design/clock_speed > + /stor/circuit_design/fub_layout > - /* > AND > + /clock_speed > + /fub_layout > - /* Could you please help me out? Thanks. -Original Message- From: Nitin Agarwal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 3:49 PM To: Leaw, Chern Jian Cc: 'Wayne Davison'; '[EMAIL PROTECTED]' Subject: Re: --include option Rather u can make two files, name the first one as includelist and second one as exclude list. Make entries of all the files u want to include in rsync in file "includelist" and entries of files to be excluded in "excludelist". then give the command: rsync -avz .. --include-from=includelist --exclude-from=excludelist ...rest command continues This will work well.. If anybody has faced any problems in doing the synchronisation this way, please let me know, so that i can be prepared for them.. :-) Nits "Leaw, Chern Jian" wrote: > Hi Wayne, > > I tried your suggestion, but did not work. It still copied the entire > filesystem across to the destination machine. > I tried having the following: > + /*/clock_speed > + /*/fub_layout > - /* > > AND > + circuit_design/clock_speed > + circuit_design/fub_layout > - /* > > AND > + /stor/circuit_design/clock_speed > + /stor/circuit_design/fub_layout > - /* > > Could you explain to me the idea of having the +, -, and /* ? Do the number > of /* indicate the subdirectory levels before arriving at the directory to > include? > > The other alternative you suggested below works well: > rsync -avz /stor/circuit_design/{clock_speed,fub_layout} > mickey.willowglen.com:/stor/circuit_design/ > > But I would like to have these include list into a file, as I'd be having > many other sub-directories to include, yet exclude. > > Appreciate it if you could help me out. > > Thanks. > > -Original Message- > From: Wayne Davison [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 13, 2002 12:57 AM > To: Leaw, Chern Jian > Cc: '[EMAIL PROTECTED]' > Subject: Re: --include option > > On Mon, 12 Aug 2002, Leaw, Chern Jian wrote: > > # rsync -avz --include-from=files_included /stor/circuit_design/ > > mickey.willowglen.com:/stor/circuit_design/ > > The problem with your command is that it contains include directives but > no exclusions, so nothing limits the default operation of sending the > entire subdirectory contents. An easier way to go for this specific > problem is to ignore includes and specify two source dirs, like this: > > rsync -avz /stor/circuit_design/{clock_speed,fub_layout} > mickey.willowglen.com:/stor/circuit_design/ > > The above assumes your shell has {} expansion, like bash and zsh. If it > does not, just mention both directories separately (without any trailing > slash). The trailing slash on the destination isn't required, but it > doesn't hurt either, so I left it in. > > To make things work with your include-using command, you'd need to use > something like this in your include file: > > + /clock_speed > + /fub_layout > - /* > > This allows the two directories you want, and excludes everything else > in the base directory of the transfer. Since none of the rules apply to > files deeper than the base dir, none of them will be excluded. > > ..wayne.. > -- > To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: --include option
Rather u can make two files, name the first one as includelist and second one as exclude list. Make entries of all the files u want to include in rsync in file "includelist" and entries of files to be excluded in "excludelist". then give the command: rsync -avz .. --include-from=includelist --exclude-from=excludelist ...rest command continues This will work well.. If anybody has faced any problems in doing the synchronisation this way, please let me know, so that i can be prepared for them.. :-) Nits "Leaw, Chern Jian" wrote: > Hi Wayne, > > I tried your suggestion, but did not work. It still copied the entire > filesystem across to the destination machine. > I tried having the following: > + /*/clock_speed > + /*/fub_layout > - /* > > AND > + circuit_design/clock_speed > + circuit_design/fub_layout > - /* > > AND > + /stor/circuit_design/clock_speed > + /stor/circuit_design/fub_layout > - /* > > Could you explain to me the idea of having the +, -, and /* ? Do the number > of /* indicate the subdirectory levels before arriving at the directory to > include? > > The other alternative you suggested below works well: > rsync -avz /stor/circuit_design/{clock_speed,fub_layout} > mickey.willowglen.com:/stor/circuit_design/ > > But I would like to have these include list into a file, as I'd be having > many other sub-directories to include, yet exclude. > > Appreciate it if you could help me out. > > Thanks. > > -Original Message- > From: Wayne Davison [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 13, 2002 12:57 AM > To: Leaw, Chern Jian > Cc: '[EMAIL PROTECTED]' > Subject: Re: --include option > > On Mon, 12 Aug 2002, Leaw, Chern Jian wrote: > > # rsync -avz --include-from=files_included /stor/circuit_design/ > > mickey.willowglen.com:/stor/circuit_design/ > > The problem with your command is that it contains include directives but > no exclusions, so nothing limits the default operation of sending the > entire subdirectory contents. An easier way to go for this specific > problem is to ignore includes and specify two source dirs, like this: > > rsync -avz /stor/circuit_design/{clock_speed,fub_layout} > mickey.willowglen.com:/stor/circuit_design/ > > The above assumes your shell has {} expansion, like bash and zsh. If it > does not, just mention both directories separately (without any trailing > slash). The trailing slash on the destination isn't required, but it > doesn't hurt either, so I left it in. > > To make things work with your include-using command, you'd need to use > something like this in your include file: > > + /clock_speed > + /fub_layout > - /* > > This allows the two directories you want, and excludes everything else > in the base directory of the transfer. Since none of the rules apply to > files deeper than the base dir, none of them will be excluded. > > ..wayne.. > -- > To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
RE: --include option
Hi Wayne, I tried your suggestion, but did not work. It still copied the entire filesystem across to the destination machine. I tried having the following: + /*/clock_speed + /*/fub_layout - /* AND + circuit_design/clock_speed + circuit_design/fub_layout - /* AND + /stor/circuit_design/clock_speed + /stor/circuit_design/fub_layout - /* Could you explain to me the idea of having the +, -, and /* ? Do the number of /* indicate the subdirectory levels before arriving at the directory to include? The other alternative you suggested below works well: rsync -avz /stor/circuit_design/{clock_speed,fub_layout} mickey.willowglen.com:/stor/circuit_design/ But I would like to have these include list into a file, as I'd be having many other sub-directories to include, yet exclude. Appreciate it if you could help me out. Thanks. -Original Message- From: Wayne Davison [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 12:57 AM To: Leaw, Chern Jian Cc: '[EMAIL PROTECTED]' Subject: Re: --include option On Mon, 12 Aug 2002, Leaw, Chern Jian wrote: > # rsync -avz --include-from=files_included /stor/circuit_design/ > mickey.willowglen.com:/stor/circuit_design/ The problem with your command is that it contains include directives but no exclusions, so nothing limits the default operation of sending the entire subdirectory contents. An easier way to go for this specific problem is to ignore includes and specify two source dirs, like this: rsync -avz /stor/circuit_design/{clock_speed,fub_layout} mickey.willowglen.com:/stor/circuit_design/ The above assumes your shell has {} expansion, like bash and zsh. If it does not, just mention both directories separately (without any trailing slash). The trailing slash on the destination isn't required, but it doesn't hurt either, so I left it in. To make things work with your include-using command, you'd need to use something like this in your include file: + /clock_speed + /fub_layout - /* This allows the two directories you want, and excludes everything else in the base directory of the transfer. Since none of the rules apply to files deeper than the base dir, none of them will be excluded. ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: --include option
On Mon, 12 Aug 2002, Leaw, Chern Jian wrote: > # rsync -avz --include-from=files_included /stor/circuit_design/ > mickey.willowglen.com:/stor/circuit_design/ The problem with your command is that it contains include directives but no exclusions, so nothing limits the default operation of sending the entire subdirectory contents. An easier way to go for this specific problem is to ignore includes and specify two source dirs, like this: rsync -avz /stor/circuit_design/{clock_speed,fub_layout} mickey.willowglen.com:/stor/circuit_design/ The above assumes your shell has {} expansion, like bash and zsh. If it does not, just mention both directories separately (without any trailing slash). The trailing slash on the destination isn't required, but it doesn't hurt either, so I left it in. To make things work with your include-using command, you'd need to use something like this in your include file: + /clock_speed + /fub_layout - /* This allows the two directories you want, and excludes everything else in the base directory of the transfer. Since none of the rules apply to files deeper than the base dir, none of them will be excluded. ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
--include option
HI, I'm trying to have files to be included during rsync. I have the filesystem /stor/circuit_design/, with the following subdirectories as its contents: clock_speed fub_layout test_simulations pattern_flow I would only like to rsync the following 2 subdirectories to the destination machine: clock_speed fub_layout and they're contained in the file called files_included: # cat files_included clock_speed fub_layout Hence, I invoked rsync as below: # rsync -avz --include-from=files_included /stor/circuit_design/ mickey.willowglen.com:/stor/circuit_design/ However, after rsync is invoked, the other sub-directories i.e test_simulations and pattern_flow were also included in the destination filesystem. I've tried with the following pattern combinations in the file files_included: *clock_speed* *fub_layout* AND /clock_speed /fub_layout AND /stor/circuit_design/clock_speed /stor/circuit_design/fub_layout AND FINALLY circuit_design/clock_speed circuit_design/fub_layout All other 4 methods did not produced the desired result. Could someone tell me what is the proper way in including the patterns for the --include-from option? Thanks. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html