-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHG] switch to mysql config file [CHG] the readme [CHG] drop-database to drop-table [CHG] bash echo output
- Loading branch information
1 parent
ef2073c
commit 5f35599
Showing
3 changed files
with
68 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,38 @@ | ||
**The Discribtion follows!** | ||
# Matomo backup | ||
|
||
This repository contains one bash script and a MySQL config file. | ||
|
||
This script is aimed to use on shared hostings. | ||
|
||
## General Informations | ||
|
||
This bash script follows the official backup recommandations on matomo.org. Learn more in the [FAQ article](https://matomo.org/faq/how-to/how-do-i-backup-and-restore-the-matomo-data/). | ||
The only thing i added is the add-drop-table option for mysqldump. | ||
|
||
**The script does the following steps:** | ||
|
||
1. Backup Matomo database (MySQL/MariaDB) | ||
2. Compress database backup with tar and gzip | ||
3. Delete uncompressed database backup file | ||
4. Backup Matomo's files | ||
5. Removing old backups | ||
|
||
## What do you need | ||
|
||
- **NO root access. Yeh!** | ||
- Access to SSH or SFTP | ||
- The tar extension | ||
|
||
## How to use this script | ||
|
||
- After Cloning or downloading the repository you'll have to change the variable values in the matomo_backup.sh file. All values which need to be customized are marked with TODO in the script's comments. | ||
- You also have to customized the database credentials in the config.cnf file. You can find your matomo credentials under /config/config.ini.php | ||
- For security reasons I recommend to keep the repository files and backup files outside the public folder. The public folder is usually /var/www/matomo. | ||
|
||
### Argument(s) | ||
|
||
There is only one argument. If specified, the path to the backup can be determined. | ||
|
||
Here is an Example: | ||
|
||
```$ ./matomo_backup.sh /alternat/path/to/matomo/backup``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ extended-insert | |
no-autocommit | ||
quick | ||
single-transaction | ||
add-drop-database | ||
add-drop-table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters