https://github.com/couapy/backup-data
Simple backup tool.
https://github.com/couapy/backup-data
backup bashscript
Last synced: 7 months ago
JSON representation
Simple backup tool.
- Host: GitHub
- URL: https://github.com/couapy/backup-data
- Owner: Couapy
- License: mit
- Created: 2021-07-10T14:25:54.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-10T14:25:57.000Z (over 4 years ago)
- Last Synced: 2025-03-20T06:35:22.888Z (10 months ago)
- Topics: backup, bashscript
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# backup-data
This backup tool was developed to keep the database and files safe.
Backup files are saved in the `/backup` directory by default.
## Configuration
1. First of all, edit database configuration in the `config/mysql.conf` file following [this documentation](https://dev.mysql.com/doc/refman/8.0/en/option-files.html).
2. List directories and files that need to be save in `config/files.list`.
3. Edit `backup.sh` and edit configuration variables in the head of the file.
## Manual backup
To start a backup just run :
```bash
cd path-to/.../backup-data/
sh backup.sh
```
## Automatic backup
**cron** is perfect for your job. Just a simple example (at 04:00 on Monday) :
```crontab
0 6 * * * root /usr/bin/bash /path-to/.../backup.sh
```