graysky2 / anything-sync-daemon

Symlinks and syncs user specified dirs to RAM thus reducing HDD/SDD calls and speeding-up the system.
https://wiki.archlinux.org/index.php/Anything-sync-daemon
MIT License
345 stars 45 forks source link

optimize the syncing process using rsync --link-dest #72

Closed manorit2001 closed 2 years ago

manorit2001 commented 2 years ago

This change won't preserve the hardlinks anymore right now, but will allow the backups to be much faster and space efficient.

Also, this change maintains two states now, one directory refers to the directory before running asd and the other directory keeps track of the directory after running asd

If a proper unsync happens. The new directory will be moved atomically to the place where the original directory existed, if not, the previous directory will be backed up in tar.zstd format and the updated directory will be moved back to the place of original directory ( since this directory might have suffered syncing issues, backup is formed from the old directory)