How to automate database backup

Started by Novel Web Solution, Jul 18, 2022, 01:05 AM

Previous topic - Next topic

Novel Web SolutionTopic starter

I was tired of making backup of the site database manually. It's annoying.

Please tell me how to automate the DB backup.

What do I need:

So that every day 3 times at 18.00, 21.00, 24.00 automatically (from the hosting) a backup of the site database is made

on my hard drive to a folder that is at the root of the E drive. Moreover,  the backup from 21.00 is not

rewritten to backup 18.00 and so on. So that, for example, at 00.10 I went into the folder and saw 3 copies of the database backup.

I imagine it like this. I create a folder on drive E (at the root, permanent). When making a 18.00 hour backup

a folder is automatically created (folder name - day, month, year of backup), and a folder in it (folder name - backup time).

Something like this. Or is there some better way to do it?

Ideally, it would be nice if every 3 days backups that were made earlier than 3 days were deleted in folders.
I always have 9 copies of the database in the folders for the last 3 days.
Hosting Beget. Should be free.


Create an archived dump by cron on the server.

To local machine (if it meant) it is possible to pull together in a bunch of ways.

For example, wget by the scheduler, or ftp client.

I use Cygwin under Windows, I would set up cron, and at least pull it over ssh.