We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da295de commit ee189ceCopy full SHA for ee189ce
1 file changed
share/github-backup-utils/ghe-backup-userdata
@@ -26,9 +26,9 @@ ghe_remote_version_required "$host"
26
# to an older version of GHE or no data has been added to this directory yet.
27
ghe-ssh "$host" -- "[ -d '$GHE_REMOTE_DATA_USER_DIR/$dirname' ]" || exit 0
28
29
-# If we have a previous increment, avoid transferring existing files via rsync's
+# If we have a previous increment and it is not empty, avoid transferring existing files via rsync's
30
# --link-dest support. This also decreases physical space usage considerably.
31
-if [ -d "$GHE_DATA_DIR/current/$dirname" ]; then
+if [ -d "$GHE_DATA_DIR/current/$dirname" ] && [ "$(ls -A $GHE_DATA_DIR/current/$dirname)" ]; then
32
link_dest="--link-dest=../../current/$dirname"
33
fi
34
0 commit comments