Skip to content

TsSaltan/ws-backuper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebServer Backuper

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:

Backup your project using script

  1. Put configuration backup file .backup.yml (and .env is necessary) to your project directory
  2. Run backuper.sh from your project directory

Backup your project using docker container

  1. Put configuration backup file .backup.yml (and .env is necessary) to your project directory
  2. Build the container docker build -t ws-backuper .
  3. 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
  1. Add task to crontab:
crontab -e

Put 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

Backup your project using docker container via docker compose

  1. Put configuration backup file .backup.yml (and .env is necessary) to your project directory
  2. 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
  1. Run compose service: docker compose up backuper (use --build param for first start)
  2. Add task to crontab:
crontab -e

Put your preferred schedule

0 2 * * * cd /path/to/your/project && docker compose up --abort-on-container-exit backuper

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors