Databse Backup Cron

How can i make only database backup cronjob everyday that deletes old backups too?

using regular cronjob

depend on how you create the script

me: i dont know about the conjob well

You have to create a script for the removal of old and update of new.
And set a corn using cyberpanel cron or ssh to export only database daily


for this it requires a script you can do it in different languages, if you do not have much knowledge with programming or sysadmin I recommend that you use bash to create a script that allows you to delete files after x days and complement it with the cyberpanel backup task and a Once you have proven that it works as you need, you can create a cronjob.

you can use the following link as a reference → Borrar archivos más antiguos de X días en Linux ~ Blai Blog

What is the command for creating only database backup?


the command to backup the database is as follows

mysqldump name_db > name_db.sql

I recommend that you send the command in the path associated with the user to which you will dump the database, since that way the .sql file will remain in that path

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.