4.5 KiB
MB Backup Manager Documentation
Overview
The MB Backup Manager is a comprehensive backup solution designed for managing automated backups of web applications, particularly those running on the Virtuozzo Application Platform. This tool leverages cron jobs for scheduling backups and utilizes Restic for efficient backup storage and management.
Features
- Automated Backups: Schedule daily, weekly, or custom backups using cron jobs.
- Backup Types: Supports backing up core files, media files, and databases.
- Logging: Detailed logging of backup operations for monitoring and troubleshooting.
- Backup Rotation: Automatically manages old backups to save storage space.
Installation
-
Clone the Repository: Clone the repository containing the backup manager scripts to your local machine or server. The repository can be found at: MB Backup Manager Repository
-
Install Dependencies: Ensure that
Restic
andcron
are installed on your system. You can install them using the following commands:sudo dnf install -y cronie sudo dnf install -y restic
-
Set Up Directory Structure: Create the necessary directories for logs and scripts:
mkdir -p /home/litespeed/mb-backups/logs/auto mkdir -p /home/litespeed/mb-backups/logs/manual
-
Configure Environment: Ensure that the environment variables and configuration files are set up correctly, including the Restic password stored in
/etc/restic-password
. -
Install from the Virtuozzo Marketplace: To install the MB Backup Manager from the Virtuozzo Marketplace, follow these steps:
- Log in to your Virtuozzo Application Platform dashboard.
- Navigate to the Marketplace section.
- Search for "MB Backup Manager" in the marketplace.
- Click on the application to view its details and click the Install button.
- Follow the prompts to complete the installation process.
For more detailed instructions on using the Virtuozzo Marketplace, refer to the official documentation: Virtuozzo Marketplace Documentation.
Usage
Managing Backup Schedules
The manage_backup_schedule.sh
script is used to add, update, or remove backup schedules.
-
Add or Update a Backup Schedule:
To add or update a backup schedule, run the following command:
./manage_backup_schedule.sh add '0 1 * * *' 'your_restic_password'
This example schedules a backup to run daily at 1 AM.
-
Remove a Backup Schedule:
To remove an existing backup schedule, use:
./manage_backup_schedule.sh remove
Checking Scheduled Backups
You can check the current scheduled backups using the check_sched.sh
script:
./check_sched.sh
This will log the current cron jobs related to the backup script and indicate whether automated backups are enabled.
Running Backups Manually
To run backups manually, you can execute the backup_all.sh
script directly:
bash /home/litespeed/mb-backups/backup_all.sh
Troubleshooting
-
Cron Service Issues:
- If the cron service is not running, ensure it is installed and started:
sudo systemctl start crond sudo systemctl enable crond
- If the cron service is not running, ensure it is installed and started:
-
Log Files:
- Check the log files located in
/home/litespeed/mb-backups/logs/auto
for any errors or issues during backup operations.
- Check the log files located in
-
Restic Issues:
- Ensure that Restic is installed and configured correctly. You can verify its installation by running:
restic version
- Ensure that Restic is installed and configured correctly. You can verify its installation by running:
-
Backup Failures:
- If a backup fails, check the corresponding log file for detailed error messages. The logs are typically located in
/var/log/backup_addon.log
.
- If a backup fails, check the corresponding log file for detailed error messages. The logs are typically located in
-
Cron Job Not Found:
- If the scheduled cron job is not found, ensure that the
manage_backup_schedule.sh
script was executed successfully and that the cron job was added correctly.
- If the scheduled cron job is not found, ensure that the
Conclusion
The MB Backup Manager provides a robust solution for managing backups in a cloud environment. By following the guidelines outlined in this documentation, developers can effectively set up, manage, and troubleshoot the backup processes. For further assistance, please refer to the log files or reach out to the development team.
Repository Information
For the latest updates and commit history, you can find the repository at: MB Backup Manager Repository