Cloudshort
Updating
Get a new version of Cloudshort, update the database, and deploy it.
Read the changelog first. Some versions have extra upgrade steps.
Update
From your cloudshort folder:
git pull
pnpm install
pnpm run project:setup
pnpm run project:deploy
project:setup applies any new database changes and keeps your password when you answer Y. It never deletes links or clicks.
Database changes
Database changes live in the migrations/ folder, one file per change. Cloudflare remembers which ones were applied, so each runs only once. To apply them without the rest of the setup:
npx wrangler d1 migrations apply cloudshort-db --remote --config apps/redirector/wrangler.toml
Backups
D1 keeps a history of your database (Time Travel): 7 days on the Workers Free plan, 30 days on Workers Paid. You can go back to any point in that window:
npx wrangler d1 time-travel info cloudshort-db
npx wrangler d1 time-travel restore cloudshort-db --timestamp=1790683200
The timestamp is in seconds since 1970 (UTC). The example is 2026-09-29 12:00 UTC.
Restoring replaces the whole database with its state at that time, including clicks. See D1 Time Travel for details.
KV (the fast copy of your links) is not restored, and saving a link updates only that link in KV. After a restore, open and save every link whose destination changed. Links deleted after the restore time come back in D1 but not in KV, so save those too.