I am a beginner in IT and Web Development.
I would like to create a backup of the Mautic installed on a hosting server “A” and restore it in another server “B”. How do I do that?
If it’s possible to automate the backup and the restoration, please tell me how to proceed.
Mautic backup is no different than any other software backup, that is installed on a web server.
Zip the folder + backup DB and move it. (make sure domain settings are okay.)
If you want to do it on a larger scale, look into:
The problem is that I have never performed a backup of a web software.
How do I zip the mautic folder (home/public_html/mautic)?
For the database backup, I suppose that I only need to use the backup wizard of my control panel. Is there a way to automate it?
What should I copy and paste?
If you know any cron jobs to automate the backup of Mautic, please inform me what they are.
If there is a way to automate the restoration to another server periodically, that would be even better!
We can only give you examples. You need to learn Linux System Administrations especially command line tools cp, tar, rsync, ssh, crontab, mysql, and mysqldump.
Here are some snippets from my backup bash script below. A keep a week or 2 of backups on the server. I’m on AWS so copy my /backups contents to a S3 bucket and a 2nd server.
If you not on AWS, you can use rsync to sync your backup folder to another server.
For restoration, you would restore the apache/nginx config files, restore the mautic folder, and restore the mysql database, and change the DNS to point to your new server.
purge old daily and weekly backups after mtime days.