Skip to content

Commit f9aab7a

Browse files
committed
save: exclude system.sessions when saving
1 parent 54b2a37 commit f9aab7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commands/save

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ fi
251251
for database in "${databases[@]}"; do
252252
save_dest="${save_path}${database}${final_ext}"
253253
echo ">> Saving ${database} to ${save_dest}"
254-
echo "${password:-}" | mongodump "${connection[@]}" "${cmd_args[@]}" "--archive=-" "--db=${database}" | "${compression_cmd[@]}" | tee >(sha256sum > /tmp/sha.txt) > "${save_dest}";
254+
echo "${password:-}" | mongodump "${connection[@]}" "${cmd_args[@]}" "--archive=-" "--db=${database}" --excludeCollection="system.sessions" | "${compression_cmd[@]}" | tee >(sha256sum > /tmp/sha.txt) > "${save_dest}";
255255
awk "{print \$1 \" ${database}${final_ext}\"}" < /tmp/sha.txt | tee -a "${save_path}/CHECKSUM"
256256
done
257257

0 commit comments

Comments
 (0)