Closed yutayu closed 3 years ago
# sync the tmpfs targets to the disc
if [[ -e "$DIR"/.flagged ]]; then
REPORT="resync"
if [[ $OLFS -eq 1 ]]; then
rsync -aX --delete-after --inplace --no-whole-file --exclude .flagged "$DIR/" "$BACK_OVFS/"
else
rsync -aX --delete-after --inplace --no-whole-file --exclude .flagged "$DIR/" "$BACKUP/"
fi
<span class="pl-k">else</span>
Coonfusion , sorry.
Back , I mean it is no need to compare timestamps and to sync anymore when psd uses overlayfs. so , cp command will work and will make disc access reduce.
cp /upper dir/. /foo-bar-ovfs .
I got it .My bad.
I think that no need to compere date of files with overlayfs mode. Because files on overlayfs upper mounted directory are all newer than original.
cp /overlay upper mount directory/. /backup ( excludes .flags )
Cp can reduce reading disk costs than rsync with overlayfs mode.