Make backups for your project files and databases to ZIP archive and upload to remote. Backup configs should be stored into YAML file (.backup.yml) and environment (.env) file.
Supported remotes:
- Yandex.Disk (how to get access-token)
- Dropbox (how to get access-token)
- Put configuration backup file .backup.yml (and .env is necessary) to your project directory
- Run backuper.sh from your project directory
- Put configuration backup file .backup.yml (and .env is necessary) to your project directory
- Build the container
docker build -t ws-backuper . - Mount your project directories or volumes to
/backup/{PROJECT_DIR_NAME}and run container
docker run -it -v path/to/your/project:/backup/my_1_project/ -v path/to/your/project2:/backup/my_2_project/ ws-backuper- Add task to crontab:
crontab -ePut your preferred schedule
0 2 * * * cd /path/to/your/project && docker run -it -v path/to/your/project:/backup/my_1_project/ -v path/to/your/project2:/backup/my_2_project/ ws-backuper
- Put configuration backup file .backup.yml (and .env is necessary) to your project directory
- Add service to your compose file:
backuper:
container_name: backuper
restart: never
image: tssaltan/ws-backuper:latest
volumes:
- ./projects/my_project1:/backup/my_project1:Z
- ./projects/my_project2:/backup/my_project2:Z- Run compose service:
docker compose up backuper(use --build param for first start) - Add task to crontab:
crontab -ePut your preferred schedule
0 2 * * * cd /path/to/your/project && docker compose up --abort-on-container-exit backuper