graysky2 / profile-sync-daemon

Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Other
909 stars 89 forks source link

cp command with overlayfs mode. #299

Closed yutayu closed 3 years ago

yutayu commented 3 years ago

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.

yutayu commented 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>
yutayu commented 3 years ago

Coonfusion , sorry.

yutayu commented 3 years ago

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.

yutayu commented 3 years ago

cp /upper dir/. /foo-bar-ovfs .

yutayu commented 3 years ago

I got it .My bad.