File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,8 @@ while [[ $rc -ne 0 && $RETRY -lt $MAX_RETRIES ]]; do
149
149
/diskrsync-tcp $BLOCK_SOURCE --source --target-address 127.0.0.1 --port $STUNNEL_LISTEN_PORT
150
150
rc=$?
151
151
else
152
- ls -A " ${SOURCE} " / > /tmp/filelist.txt
152
+ # Find all files/dirs at root of pvc, prepend / to each (rsync will use SOURCE as the base dir for these files)
153
+ find " ${SOURCE} " -mindepth 1 -maxdepth 1 -printf ' /%P\n' > /tmp/filelist.txt
153
154
if [[ -s /tmp/filelist.txt ]]; then
154
155
# 1st run preserves as much as possible, but excludes the root directory
155
156
rsync -aAhHSxz -r --exclude=lost+found --itemize-changes --info=stats2,misc2 --files-from=/tmp/filelist.txt ${SOURCE} / rsync://127.0.0.1:$STUNNEL_LISTEN_PORT /data
Original file line number Diff line number Diff line change 113
113
file_count : 21000
114
114
pvc_name : ' data-source'
115
115
116
+ - name : Write file that starts with a hash char
117
+ include_role :
118
+ name : write_to_pvc
119
+ vars :
120
+ data : ' 000111'
121
+ path : ' /#filestartswithhash'
122
+ file_count : 1
123
+ pvc_name : ' data-source'
124
+
125
+ - name : Write dir that starts with a hash char
126
+ include_role :
127
+ name : write_to_pvc
128
+ vars :
129
+ data : ' 222333444555'
130
+ path : ' /#dirtartswithhash/#subfile'
131
+ file_count : 1
132
+ pvc_name : ' data-source'
133
+
116
134
- name : Wait for key and address to be ready
117
135
kubernetes.core.k8s_info :
118
136
api_version : volsync.backube/v1alpha1
You can’t perform that action at this time.
0 commit comments