Reputation: 1770
When I backup a folder locally with the following script, a subfolder "core" is omitted:
mkdir {gsp,dst}
svn co http://10.0.2.59:8118/svn/gsp/Development-Area/3-SCL/Trunk/TaskServer_Gsp gsp
rsync -auC gsp/* dst/
diff -rq gsp dst
The output is:
Only in gsp/com.boco.gdpp.taskserver.core/src/com/boco/gdpp/taskserver: core
Only in gsp: .svn
The return value of rsync command is 0, which means there's no error. The following is the structure of folder "gsp" and "dst", the "core" is not the deepest subfolder. Why the "core" can't be copied to "dst"?
tree -d gsp
gsp
|-- com.boco.gdpp.taskserver.core
| |-- lib
| |-- META-INF
| | `-- spring
| `-- src
| `-- com
| `-- boco
| `-- gdpp
| `-- taskserver
| |-- config
| | `-- exports
| | `-- exceptions
| |-- core
| | |-- changenode
| | | |-- element
| | | `-- process
| | `-- task
| | `-- util
| |-- export
| | |-- bean
| | | |-- enums
| | | `-- processdef
| | `-- util
| | `-- processtree
| `-- msg
| `-- support
|-- com.boco.gdpp.taskserver.gsp.gworkflow
| |-- libs
| |-- META-INF
| | `-- spring
| `-- src
...(more folders)
94 directories
tree -d dst
dst
|-- com.boco.gdpp.taskserver.core
| |-- lib
| |-- META-INF
| | `-- spring
| `-- src
| `-- com
| `-- boco
| `-- gdpp
| `-- taskserver
| |-- config
| | `-- exports
| | `-- exceptions
| |-- export
| | |-- bean
| | | |-- enums
| | | `-- processdef
| | `-- util
| | `-- processtree
| `-- msg
| `-- support
|-- com.boco.gdpp.taskserver.gsp.gworkflow
| |-- libs
| |-- META-INF
| | `-- spring
| `-- src
...(more folders)
88 directories
Upvotes: 1
Views: 100
Reputation: 782785
The -C
option causes rsync
to ignore files and directories matching various patterns, which includes core
. This name is usually used for process crash dump files. From the man page:
The exclude list is initialized to:
RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state .nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK
*.orig *.rej .del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core .svn/
You can override this with:
--include=core
Upvotes: 3