---
title: "Deploy MySql backups to Cloudinary"
description: "Node app to backup MySQL database and upload it to Cloudinary."
category: "Automation"
url: https://railway.com/deploy/mT6Hiw
---

# Deploy MySql backups to Cloudinary

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

**[Deploy MySql backups to Cloudinary on Railway](https://railway.com/template/mT6Hiw)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/mT6Hiw/manifest.json

- **Creator:** My Projects
- **Category:** Automation
- **Total deploys:** 24

## Template content

### mysqlCloudinaryBackups

- **Source:** https://github.com/danielthames360/mysqlCloudinaryBackups

## Documentation

# 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:
  <pre><code>  const job = new CronJob(env.CRON_SCHEDULE.DAILY, async () =&gt; {
  // ...
  });
</code></pre>

## 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](https://res.cloudinary.com/dy8ukvwe2/image/upload/v1688259734/cloudinaryPreview_ravysj.png)
The folder for backups will be automatically created with the following name: <b>databaseBackups/{currentYear}/Month-{currentMonth}</b>

### Sql backup script

![Screenshot 2](https://res.cloudinary.com/dy8ukvwe2/image/upload/v1688259735/sqlPreview_mfrbhr.png)


## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/mT6Hiw
