Skip to content

Convenience helpers to backup Vercel blob data and MongoDB collections to S3 and to restore from it again.

Notifications You must be signed in to change notification settings

feerglas/backup-vercel-blob-and-mongo-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6211996 · Mar 18, 2025

History

12 Commits
Mar 18, 2025
Mar 18, 2025
Mar 18, 2025
Mar 18, 2025
Mar 16, 2025
Mar 16, 2025
Mar 17, 2025
Mar 18, 2025
Mar 18, 2025
Mar 18, 2025

Repository files navigation

Backup and Restore Vercel Blob Data and MongoDB collections

Helpers for various tasks concerning backup and restore of Vercel blob data and MongoDB to S3.

Run locally

To run the jobs locally, make sure to copy .env.example to .env and fill in the corresponding values for the variables.

Jobs

These jobs are available as npm scripts.

  • Ideally, blob backup, db backup und backups cleanup should be run as cron jobs on a regular basis.
  • Restore blob and restore db are meant to be executed on demand and triggered locally.

cron job 1: blob backup

npm run backup:blob

get all blob data (vercel) and save to s3 (ovh)

cron job 2: db backup

npm run backup:db

make db-dump (ovh) and save to s3 (ovh)

cron job 3: backups cleanup

npm run backup:cleanup

delete old blob-backups and db-backups

disaster recovery script 1: blob restore

npm run restore:blob

get blob data backup from s3 (ovh) and save to blob data (vercel)

disaster recovery script 2: db restore

npm run restore:db

get db-backup from s3 (ovh) and save to mongoDb (ovh)

Todo

  • Send mail on failure

About

Convenience helpers to backup Vercel blob data and MongoDB collections to S3 and to restore from it again.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published