local.link

Buckets

Your folders, in your clouds. Back up your files to every cloud you connected, check every copy, and free the space here once they're safe. Nothing runs in the background, and your files never pass through Local Link's servers.

Needs: macOS or Linux, and an account with a cloud or an external drive. Storage and downloads are billed by your cloud.

Quickstart

lnk up buckets                          # install the bucket plugin
lnk bucket create aws                   # a bucket in your aws account; reuses your aws login
lnk bucket push photos/2019             # ~/Link/Personal/photos/2019 to every cloud, then checked
lnk bucket tree -L 2                    # what's where, per cloud; works offline
lnk bucket clean photos/2019            # delete here, only if every cloud has a checked copy
lnk bucket pull 'photos/2019/**/*.jpg'  # back from the cheapest cloud, checked

Paths are in ~/Link/Personal, or an agent's files folder.

Connect a cloud

lnk bucket create aws                      # your aws login, or an access key
lnk bucket create gcp                      # your gcloud login, or in the browser
lnk bucket create s3 --endpoint <url>      # R2, Wasabi, MinIO: its address and a key
lnk bucket create folder /Volumes/T7       # an external drive
lnk bucket create b2                       # B2, Drive, Dropbox, SFTP and more: it asks what it needs
lnk bucket clouds                          # what you connected

Add as many as you like. Each gets a private bucket, tested before it's used. --encrypt encrypts your files before they leave your computer; lnk makes a password and shows it once, so keep it. On another computer, lnk bucket connect aws --bucket <name> uses a bucket that exists already, and makes none.

Back up

lnk bucket push photos/2019

Sends files to every cloud, skipping what's already there, then checks every copy it sent by its checksum. Files unchanged since their last check are skipped; --all sends and checks them too. It never deletes anything, and never replaces a copy that differs from your file, so a file corrupted here can't ruin a good copy. --to <cloud> picks one cloud.

See what's where

lnk bucket tree -L 2

One mark per cloud: ✓ checked, A checked in an archive tier, ? not checked, ≠ differs, ✗ missing. --refresh lists the clouds again first, to find files pushed from another computer.

Free up space

lnk bucket clean photos/2019 --dry-run   # say what it would delete
lnk bucket clean photos/2019

Checks every cloud again, now, and deletes the files here only if every cloud has a copy with the same checksum. Otherwise it deletes nothing and says what's missing where. It's the only lnk command that deletes your files here.

Get files back

lnk bucket pull 'photos/2019/**/*.jpg'

Copies each file back from the cheapest cloud that has it, and checks it. --from <cloud> picks the cloud. Downloading from aws or gcp costs about $90 per TB, so pull asks first above 1 GB.

Archive old files

lnk bucket push old/scans --archive

Uses the coldest tier, AWS Deep Archive or Google Cloud Archive: about $1 per TB a month. Reading it back takes up to 12 hours on AWS and costs money on both, and deleting within 180 days (AWS) or 365 days (Google) is charged anyway. lnk asks before archiving or restoring.

lnk bucket share 'photos/2019/*.jpg'     # prints https://<you>.local.link/b/<id>
lnk bucket share notes.pdf --expires 12h --auth friend:secret
lnk bucket shares                        # your links
lnk bucket unshare <id>                  # end one now

Anyone can open the link in a browser, or download it with lnk bucket pull <link>, for up to 7 days. The files come straight from your cloud, through links your cloud signs on your computer: never through Local Link. It works for your files in aws and s3 clouds, and needs your Local Link account (lnk auth login). Anyone who opened a link can download until it would have expired, even after unshare.

Back up each agent's files

lnk bucket push ~/Link/Agents/work/Home

Each agent's folder goes to a bucket of its own in each cloud, always encrypted, with one password per agent. clean won't delete there while that agent is running. Its buckets move with it: on a box, it backs up with a key reaching only its bucket, and lnk agent restore brings it back if the box is gone.

Delete from your clouds

lnk bucket remove old/drafts          # delete copies from your clouds
lnk bucket disconnect gcp             # forget a cloud; deletes nothing in it
lnk bucket delete aws                 # delete its buckets and everything in them

remove and delete keep the last copy anywhere unless you add --everywhere.

Use rclone directly

Local Link talks to your clouds through rclone, a pinned version it downloads and checks. lnk bucket rclone runs all of it on the same clouds (mount, sync, serve, ...), without Local Link's safety rules: sync deletes.

Every flag: lnk bucket <command> --help.