Go to file
2024-12-03 23:24:37 -08:00
.vscode deno 2024-12-03 21:07:15 -08:00
.gitignore commit 2024-11-28 19:38:07 -08:00
bskybackup.deno.js catch 2024-12-03 23:24:37 -08:00
readme.md systemd 2024-12-03 22:57:13 -08:00

Simple Bluesky Backup Script

A script that downloads a Bluesky profile (repo and blobs) as well as all profiles referenced by (i.e. followed, liked, mentioned, replied to, blocked, listed, etc) that profile.

Only supports did:plc for now.

To backup one or more profiles and all related profiles:

$ deno run --allow-all bskybackup.deno.js did:plc:u4gngygg2w5egsigxu5g7byu # (you can put more than one did:plc separated by spaces)

This will preserve all content they interacted with, such as posts they liked, replied to, quoted or reposted.

To backup a profile, all related profiles AND all profiles related to related profiles:

$ deno run --allow-all bskybackup.deno.js did:plc:u4gngygg2w5egsigxu5g7byu --depth=2

This will additionally save all profiles related to the profiles related to them, so you will have a copy of everything their friends liked and reposted as well. This may be a LOT of data!

Running the script again will refresh the repositories and download new blobs. Existing blobs are not re-downloaded. Run the script regularly to keep the backups up to date.

Example SystemD

systemd timer is better than cron because it won't start it again if it's still running.

/etc/systemd/system/bskybackup.service

[Unit]
Description=Bluesky Backup script
After=network-online.target

[Service]
WorkingDirectory=/zpool1/FileStorage/srv/bskybackup/
User=bskybackup
ExecStart=deno run --allow-all bskybackup.deno.js did:plc:u4gngygg2w5egsigxu5g7byu
Type=exec

/etc/systemd/system/bskybackup.timer

[Unit]
Description=Daily Bluesky backup

[Timer]
OnCalendar=00:05:00

[Install]
WantedBy=timers.target