Skip to content

SwarmVault is a powerful, backup and migration tool for Docker Swarm environments.

License

Notifications You must be signed in to change notification settings

hipnologo/SwarmVault

Repository files navigation

SwarmVault 🔐

SwarmVault Logo

GitHub release (latest by date) License: GPL v3 GitHub stars GitHub issues GitHub forks Python 3.8+ Docker Support Code style: black

Seamless Docker Swarm Backup & Migration Suite

Key FeaturesQuick StartDocumentationContributingSupport

📋 Overview

SwarmVault is a powerful, backup and migration tool for Docker Swarm environments. It provides seamless backup and restoration of your entire Docker infrastructure, including Portainer stacks, volumes, and Swarm configurations.

Key Features

🔄 Complete Environment Backup

  • Automated Portainer stack preservation
  • Docker volume data protection
  • Swarm configuration safeguarding
  • Network settings preservation

🚀 Easy Migration

  • One-command backup creation
  • Simplified restoration process
  • Cross-server migration support
  • Minimal downtime

🛡️ Enterprise Ready

  • Detailed logging
  • Error handling
  • Remote sync capabilities
  • Compression for storage efficiency

🚀 Quick Start

Prerequisites

  • Python 3.8 or higher
  • Docker Swarm environment
  • Portainer (optional)

Installation

# Clone the repository
git clone https://github.com/hipnologo/swarmvault.git
cd swarmvault

# Make the script executable
chmod +x swarmvault.py

# Install dependencies
pip install -r requirements.txt

Basic Usage

# Create a backup
./swarmvault.py

# Backup with custom directory
./swarmvault.py --backup-dir /path/to/backups

# Backup and sync to remote server
./swarmvault.py --remote-host user@server --sync-to /remote/backup/path

📖 Documentation

Command Line Options

Option Description Default
--backup-dir Local backup directory /opt/swarmvault/backups
--remote-host Remote host for backup operations None
--sync-to Remote path to sync backups to None

Backup Contents

SwarmVault creates a comprehensive backup including:

  1. Portainer Stacks

    • Stack configurations
    • Docker compose files
    • Service definitions
  2. Docker Volumes

    • Volume data
    • Volume metadata
    • Compressed archives
  3. Swarm Configuration

    • Swarm settings
    • Network configurations
    • Node information

Backup Structure

swarmvault-backup-20240130_123456.tar.gz
├── portainer/
│   └── stacks/
│       ├── stack1.json
│       └── stack1-compose.yml
├── volumes/
│   └── volume1.tar.gz
└── swarm/
    ├── swarm-config.json
    └── network-configs/

Restoration Process

  1. Prepare Environment

    tar -xzf swarmvault-backup-*.tar.gz
  2. Restore Volumes

    # Script automatically handles volume restoration
    ./swarmvault.py --restore backup-archive.tar.gz
  3. Deploy Stacks

    # Automatic stack deployment
    ./swarmvault.py --restore-stacks backup-archive.tar.gz

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

📝 License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

🙏 Acknowledgments

  • Docker community for inspiration and support
  • All contributors who participate in this project
  • Python community for excellent tools and libraries

📧 Support

  • Create an Issue for bug reports
  • Start a Discussion for questions
  • See our Wiki for detailed documentation

📈 Project Stats

Alt

🌟 Star History

Star History Chart

📊 Activity

Alt


Made with ❤️ by the SwarmVault Team

WebsiteDocumentationReport BugRequest Feature

About

SwarmVault is a powerful, backup and migration tool for Docker Swarm environments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published