Plesk MySQL Daily Backup Script

Create file

With following content

Set it to run as cronjob

cronjob

To save result of a cronjob to a file, use

To list all cronjob, run

To edit all cronjobs, run

Disable cronjob output

To disable cronjob output, add following to end of the script

or

crontab
Start a program after reboot using cronjob
Running wp-cron with cronjob
Cronjob for Magento 1.9

Language

On Linux server if language is different, you can change it to English for current session by running

Example

See current language

List Available Languages

Change langauage

locale-gen

MongoDB

MongoDB is an Open Source NoSQL database.

https://www.mongodb.com/

Connecting to to MongoDB with user/pass

Install MongoDB

Free MongoDB hosting

Rsync backup with X days retention

rsync is run on backup server, that login to remote servers and backup.

Add following code

Repeat the rsync/echo lines for each server you need to backup.

We exclude some of the files from backup, this is specified in .rsync-exclude file.

Run it with cronjob

Backup Rotation

We rotate backup, so we have 20 days of backups. To do this, run cronjob

Create script

With following content

Here you need to add a folder for each server on line PATHES.

Here is content of excludes.txt

lvm

When i try mount a partition i get error

mount: unknown filesystem type ‘LVM2_member’

This is because the partition is LVM. Got it fixed with

monit

monit is a process monitoring service that monitor services, restart if required.

https://mmonit.com/monit/

Here are monit rules used to monitor apache, php-fpm and MySQL on bitnami cloud server.