Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ismail-mouyahada/master-bash-backup-script
Exciting Release! Introducing version 1.0 of our LAMP Backup Script, a simple yet powerful tool to automate and secure your LAMP stack data.
https://github.com/ismail-mouyahada/master-bash-backup-script
backup script
Last synced: 3 days ago
JSON representation
Exciting Release! Introducing version 1.0 of our LAMP Backup Script, a simple yet powerful tool to automate and secure your LAMP stack data.
- Host: GitHub
- URL: https://github.com/ismail-mouyahada/master-bash-backup-script
- Owner: Ismail-Mouyahada
- License: mpl-2.0
- Created: 2021-10-24T16:53:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-26T23:13:36.000Z (about 1 year ago)
- Last Synced: 2023-12-27T01:26:20.452Z (about 1 year ago)
- Topics: backup, script
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LAMP Backup Script
Hey there! 👋 This is a simple Bash script that I use to automatically back up my LAMP (Linux, Apache, MySQL, PHP/Python/Perl) stack every 5 hours. It's a handy tool to ensure I don't lose any important website data.
## How to Use
### 1. Clone the Repository
```bash
git clone https://github.com/yourusername/lamp-backup-script.git
cd lamp-backup-script
```2. Configure the Script
Open the lamp_backup.sh script in your favorite text editor. You'll find some variables at the beginning that you can customize:
```bash
# Variables
backup_dir="/path/to/backup"
vhost_path="/etc/apache2/sites-available"
website_files="/var/www/html"
db_user="your_mysql_user"
db_password="your_mysql_password"
db_name="your_database_name"
```
Update these variables with your specific LAMP setup details.
3. Make the Script Executable```bash
chmod +x lamp_backup.sh
```
4. Schedule the ScriptOpen your crontab file:
```bash
crontab -e
```
Add the following line to run the script every 5 hours:```bash
0 */5 * * * /path/to/lamp_backup.sh
```
Save and exit the crontab file.
Important NotesMake sure you have the necessary privileges to perform backups.
Confirm that MySQL is configured to allow password-less execution of mysqldump.
Adjust paths and variables in the script according to your specific LAMP setup.Feedback and Contributions
I'd love to hear your feedback or suggestions! Feel free to open issues or pull requests on GitHub.
Happy coding and secure backups! 🚀