Helpers for various tasks concerning backup and restore of Vercel blob data and MongoDB to S3.
To run the jobs locally, make sure to copy .env.example
to .env
and fill in the corresponding values for the variables.
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.
npm run backup:blob
get all blob data (vercel) and save to s3 (ovh)
npm run backup:db
make db-dump (ovh) and save to s3 (ovh)
npm run backup:cleanup
delete old blob-backups and db-backups
npm run restore:blob
get blob data backup from s3 (ovh) and save to blob data (vercel)
npm run restore:db
get db-backup from s3 (ovh) and save to mongoDb (ovh)
- Send mail on failure