News for hackers. Stuff that matters.

Self-hosted on-demand synched file storage

I have a laptop with a humble amount of disk-space and a desktop with a massive amount of disk-space.

I would like for the desktop to be a logically infinite source of storage, while the laptop stores only what I am currently using.

For example, if I have a "photos" folder with 10tb of photos, I would like to see a list of all the photos when I open the folder on my laptop. If I then select a specific photo to open, my laptop checks if it already has it downloaded locally and if not, silently pulls it from the server. If I do that thousands of times and run out of space on my laptop, the laptop should automatically purge the LRU photo to load the new one.

From the laptop's perspective, it has an unlimited amount of space - the only noticeable thing is that some files take longer to load than others.

A critical component of this is that both systems are automatically synched. If a folder is created on the laptop, it is also created on the desktop. If a file is created on the laptop it is automatically backed up to the desktop. If a file is added to the desktop, its metadata is automatically synched to the laptop. Etc.

The desktop stores a superset of the the laptop and nothing else. The laptop always knows all the files on the desktop.

What self-hosted, preferably FOSS, software does this?

( 6 comments | 5 points | on HN )
Re:Self-hosted on-demand synched file storage by mceachen on Thursday December 16, 2021 @11:34AM (#29580085)
You're describing a "distributed filesystem with client-side whole-file caching". The Andrew File System (AFSv2) did this back in the 1990s.

https://pages.cs.wisc.edu/~remzi/OSTEP/dist-afs.pdf

FWIW, complexity is introduced when the server is unavailable and the client-side caches need to be synced with the remote.

Sshfs, NFS, and SMB are substantially easier to set up and live with, so you're not fighting conflict resolutions inherent in multi-primary repositories.

Re:Self-hosted on-demand synched file storage by DataWraith on Thursday December 16, 2021 @07:00AM (#29577333)
I've been looking for software that does this myself, but I don't think it exists.

There used to be a project, https://bazil.org/, that promised to do it. The website is still up, but it has not been updated in years.

The existing tool closest to what I envision is git-annex. It tracks what files live where, and you can sync single files or as much content as will fit on the local harddrive with a few commands. There is also git-annex-assistant for a more dropbox-like experience, although I haven't used it myself.

Re:Self-hosted on-demand synched file storage by thinkloop on Friday December 17, 2021 @05:17AM (#29590212)
After some research it looks like seafile [1] and nextcloud virtual file mode [2] are viable candidates.

[1] https://www.seafile.com/en/home/ [2] https://nextcloud.com/blog/nextcloud-desktop-client-3-2-with...

Re:Self-hosted on-demand synched file storage by blmayer on Thursday December 16, 2021 @09:03AM (#29578169)
I think you're looking for this: https://syncthing.net/
Re:Self-hosted on-demand synched file storage by java-man on Thursday December 16, 2021 @10:23AM (#29579043)
Doe not look like syncthing has the concept of "vault" (using sync.com parlance) where files are stored in the cloud only.

What the OP is describing is more like apple's iCloud, where files might be offloaded from a device and stored only in the cloud, and downloaded on demand.

Re:Self-hosted on-demand synched file storage by p0d on Thursday December 16, 2021 @12:31PM (#29580962)
I used to use dropbox...I then spent years using raspberry pi's as storage devices, rclone, gdrive, s3 storage, syncthing and other solutions...I am now using dropbox again :-) (with rclone thrown in where needed)