1
For performance reasons I would like to stack tmpfs on top of the working directory of some programs. However, the program needs to access data previously saved in the "real" working directory, sometimes lots of data. So, instead of copying the whole folder to tmpfs, I thought of using OverlayFs in a similar fashion to DeepFreeze.
However, I would like to make the data persistent when unmounting the union (for example on poweroff), overwriting previous files with the same path, and leaving the other untouched.
Is there a way to automatically do this, without the user having to remember to "sync" the folders? I cannot find a feature of OverlayFs for this, and the alternative I could think of, namely a umount hook, seems not practical to implement.
Thank you for the pointer. Actually "anything-sync-daemon" is more suited for the job, as "profile-sync-daemon" is specifically tailored for browser profiles. Could you add this to your question (and maybe a link to the wiki or github page of the project) so that I can mark it as accepted? – matpen – 2017-01-03T09:59:05.837
I *knew* there was another package! I just couldn't find it. I'm using profile-sync-daemon currently as it does what I wanted, but I found it (quite some time ago) from a reference to it on some anything-sync-daemon page I was looking at; I was happy to find one suited just to browser profiles, as otherwise I was contemplating hacking anything-sync-daemon to do the same thing. I'm updating my answer to include that. – Rubio – 2017-01-03T10:07:38.477