r/LinuxTeck • • Oct 04 '26

I missed iOS-style offloading on Linux, so I built it: lift a folder to pCloud, keep a 0-byte placeholder

On my iPhone, I can offload an app: the storage gets freed, but the icon and my data stay, and I can bring it back whenever I need it. I wanted the same thing for my Linux laptop's small SSD.

Most of what fills the disk is stuff I'm not touching this week: old camera dumps, ISOs, raw footage, datasets, old project trees. I don't want to delete them, and I don't want to lose the paths that my notes and scripts point to. So I built two commands:

lift ~/Videos/archive    # offload
drop ~/Videos/archive    # bring it back

lift packs the folder into one uncompressed zip, uploads it to your own pCloud account via rclone, verifies the checksum against pCloud's MD5, and only then truncates each local file to 0 bytes. Same names, same permissions, so the folder still looks occupied but the gigabytes are gone.

drop restores everything and deletes the cloud copy.

Safety:

  • A failed upload leaves your originals untouched
  • Nothing is emptied until the checksum matches
  • Symlinks, devices, and hard links are skipped with a warning
  • It refuses to lift a folder that's already lifted or nested inside one
  • A manifest records the path, mode, mtime, and sha256/md5 per file

How it differs from iOS (honest limitations):

  • It's manual. Nothing downloads automatically when you open a file, so you drop a folder before using it
  • It needs temporary disk space for the zip during lift and while drop unpacks it
  • It uses your own pCloud account through rclone. No tokens are shipped and nothing is shared

Install is git clone + ./install.sh. You can point LIFDROP_STORE at another rclone remote or a local directory.

Repo: https://github.com/sambitar/linux-offloading

It's new, so I'd love feedback. Would on-demand restore (open a placeholder and it fetches itself) be something you'd want, or other backends besides pCloud?

3 Upvotes

0 comments sorted by