Compare commits
2 Commits
9267c98156
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2fa5bdfa7f | |||
| 846485b2e5 |
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@@ -41,12 +41,6 @@ jobs:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
- name: Debug GitHub context
|
||||
run: |
|
||||
echo "Owner: ${{ github.repository_owner }}"
|
||||
echo "Repo: ${{ github.event.repository.name }}"
|
||||
echo "Full repo: ${{ github.repository }}"
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
@@ -65,6 +59,12 @@ jobs:
|
||||
# If this is a semver tag (vX.X.X), add full + minor version tags
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
|
||||
- name: Debug GitHub context
|
||||
run: |
|
||||
echo "Tags: ${{ steps.meta.outputs.tags }}"
|
||||
echo "Labels: ${{ steps.meta.outputs.labels }}"
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
||||
57
README.md
57
README.md
@@ -45,19 +45,12 @@ BackupBot is a comprehensive backup solution that automatically discovers and ba
|
||||
cd backupbot
|
||||
```
|
||||
|
||||
2. **Create environment file:**
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# Edit .env with your settings
|
||||
nano .env
|
||||
```
|
||||
|
||||
3. **Start the container:**
|
||||
2. **Start the container:**
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
4. **Access the interfaces:**
|
||||
3. **Access the interfaces:**
|
||||
- BackupBot Config: http://localhost:8201
|
||||
- Duplicati Web UI: http://localhost:8200
|
||||
|
||||
@@ -67,8 +60,6 @@ BackupBot is a comprehensive backup solution that automatically discovers and ba
|
||||
|
||||
### Environment Variables
|
||||
|
||||
Create a `.env` file in the project root:
|
||||
|
||||
```env
|
||||
# Duplicati encryption key (required)
|
||||
KEY=your_encryption_key_here
|
||||
@@ -119,16 +110,16 @@ Additional patterns can be added by modifying the `KNOWN_IMAGES` list in `backup
|
||||
```yaml
|
||||
volumes:
|
||||
# Duplicati configuration
|
||||
- /srv/appdata/duplicati/config:/config
|
||||
- /path/to/duplicati/config:/config
|
||||
|
||||
# Backup storage (where dumps are stored)
|
||||
- /srv/backups:/backups:rshared
|
||||
- /path/to/backups:/backups:rshared
|
||||
|
||||
# Docker socket (for container discovery)
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
|
||||
# Source data for snapshots (optional)
|
||||
- /srv/appdata:/source/appdata:ro
|
||||
- /path/to/appdata:/source:ro
|
||||
```
|
||||
|
||||
---
|
||||
@@ -156,12 +147,12 @@ docker logs -f backupbot
|
||||
Backups are organized by container name:
|
||||
|
||||
```bash
|
||||
ls -lh /srv/backups/postgres_dumps/
|
||||
ls -lh /backups/postgres_dumps/
|
||||
```
|
||||
|
||||
Example structure:
|
||||
```
|
||||
/srv/backups/
|
||||
/backups/
|
||||
├── postgres_dumps/
|
||||
│ ├── myapp_db/
|
||||
│ │ ├── 2024-10-23_03-00-00.sql
|
||||
@@ -180,7 +171,7 @@ Example structure:
|
||||
1. **Discovery Phase**: BackupBot scans running Docker containers and identifies PostgreSQL instances
|
||||
2. **Extraction**: For each database, credentials are extracted from environment variables
|
||||
3. **Backup**: `pg_dumpall` creates a complete SQL dump of all databases
|
||||
4. **Snapshot**: A read-only btrfs snapshot is created of `/srv/appdata`
|
||||
4. **Snapshot**: A read-only btrfs snapshot is created of `/source`
|
||||
5. **Retention**: Old backups exceeding the retention period are automatically deleted
|
||||
6. **Notification**: On failure after retries, Gotify notifications are sent (if configured)
|
||||
|
||||
@@ -202,24 +193,6 @@ Example structure:
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Development
|
||||
|
||||
### Building from Source
|
||||
|
||||
```bash
|
||||
docker build -t backupbot:latest .
|
||||
```
|
||||
|
||||
### CI/CD Pipeline
|
||||
|
||||
BackupBot uses Gitea Actions for automated builds:
|
||||
|
||||
- **Trigger**: Push to `main` or `develop` branches
|
||||
- **Registry**: `gitea.calahilstudios.com`
|
||||
- **Tags**: `develop` and commit SHA
|
||||
|
||||
---
|
||||
|
||||
## 📊 Monitoring
|
||||
|
||||
### Web Interfaces
|
||||
@@ -251,7 +224,7 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
||||
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
||||
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
||||
4. Push to the branch (`git push origin feature/amazing-feature`)
|
||||
5. Open a Pull Request on Gitea
|
||||
5. Open a Pull Request on Github
|
||||
|
||||
---
|
||||
|
||||
@@ -259,12 +232,6 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
||||
|
||||
This project is licensed under the GNU Affero General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
|
||||
|
||||
**AGPL-3.0 Key Points:**
|
||||
- ✅ Free to use, modify, and distribute
|
||||
- ✅ Source code must be made available
|
||||
- ✅ Network use is considered distribution
|
||||
- ✅ Modifications must also be AGPL-3.0
|
||||
|
||||
---
|
||||
|
||||
## 🙏 Acknowledgments
|
||||
@@ -277,7 +244,7 @@ This project is licensed under the GNU Affero General Public License v3.0 - see
|
||||
|
||||
## 📞 Support
|
||||
|
||||
- 🐛 **Issues**: [Report bugs on Gitea](https://gitea.calahilstudios.com/owner/backupbot/issues)
|
||||
- 🐛 **Issues**: [Report bugs on Github](https://github.com/calahil/backupbot/issues)
|
||||
- 📚 **Documentation**: This README and inline code comments
|
||||
- 💬 **Discussions**: Open an issue for questions
|
||||
|
||||
@@ -295,6 +262,4 @@ This project is licensed under the GNU Affero General Public License v3.0 - see
|
||||
|
||||
---
|
||||
|
||||
**Made with ❤️ by Calahil Studios**
|
||||
|
||||
[](https://gitea.calahilstudios.com)
|
||||
**Made by Calahil Studios**
|
||||
|
||||
Reference in New Issue
Block a user