All Templates / Automation

MySql backups to Cloudinary

MySql backups to Cloudinary

Node app to backup MySQL database and upload it to Cloudinary.

Deploy MySql backups to Cloudinary

mysqlCloudinaryBackups

danielthames360/mysqlCloudinaryBackups

Just deployed

MySql Backup - Cloudinary

Node.js application that performs scheduled backups of your MySQL database and uploads them to Cloudinary for secure storage. It utilizes a cron job to automate the backup process based on your desired frequency. The backups are saved in SQL format and can be easily restored if needed.

Prerequisites

  • Node.js and npm installed in the runtime environment.
  • Valid Cloudinary credentials and access to a MySQL database.

Steps

  • Create a .env file in the project root(based on .env.example) and replace the values with your production keys(for production deployment, just create the keys on your server).
  • Configure the cron job in index.ts according to your preferences(take a look at the config.ts file ). For example, if you want to perform daily backups at 12:00 PM, use the following value:
      const job = new CronJob(env.CRON_SCHEDULE.DAILY, async () => {
    // ...
    });
    

Usage

The application will automatically perform scheduled backups of your database and upload them to Cloudinary. You can adjust the backup frequency by modifying the configuration in index.ts. If you want to run an immediate backup, you can uncomment the line void backup(); in index.ts before starting the cron job.

Screenshots

Cloudinary

Database The folder for backups will be automatically created with the following name: databaseBackups/{currentYear}/Month-{currentMonth}

Sql backup script

Screenshot 2


Template Content

Deploy Now

Details

My Projects

Created on Jul 2, 2023

24 total projects

9 active projects

100% success on recent deploys

TypeScript

Automation



More templates in this category

View Template
Postgres S3 backups

Postgres S3 backups

A simple NodeJS app to back up your PostgreSQL database to S3 via a cron


Railway Templates

View Template
Tier

Tier

A single tool to configure,orchestrate and manage your entire pricing stack


beuz's Projects

View Template
Trigger.dev

Trigger.dev

Open source background jobs framework for TypeScript.


Jan Henning's Projects