Tested on: Windows 11, Ubuntu 22.02
- Install Docker
- Add the
your-project/backups-config.json
to project which folder you want to back up. Example:
{
"type": "local-storage",
"copies": {
"daily": 4,
"weekly": 3,
"monthly": 2,
"annually": 2
}
}
More examples you can find in config-examples
folder
- Create
projects/super-easy-file-backups
folder anddocker-compose.yml
inside it.
# docker-compose.yml
version: '3'
services:
super-easy-file-backups:
image: 'ghcr.io/codelit/super-easy-file-backups'
restart: always
volumes:
- C:/Users/Adam/projects/your-project:/app/projects/your-project # from
- C:/Users/Adam/backups/your-project:/app/backups/your-project # to
# OR seek for backups-config.json in entire projects folder
- C:/Users/Adam/projects:/app/projects
- C:/Users/Adam/backups:/app/backups
You can find more examples in docker-compose.override-example.yml
.
- Run this command inside
super-easy-file-backups
folder
docker-compose up
- ✅ Check out the result
📦backups ┣ 📂annually ┃ ┣ 📜bkp_2022-08-01.tgz ┃ ┗ 📜bkp_2023-08-01.tgz ┣ 📂daily ┃ ┣ 📜bkp_2023-09-17.tgz ┃ ┣ 📜bkp_2023-09-18.tgz ┃ ┣ 📜bkp_2023-09-19.tgz ┃ ┗ 📜bkp_2023-09-20.tgz ┣ 📂monthly ┃ ┣ 📜bkp_2023-08-01.tgz ┃ ┗ 📜bkp_2023-09-01.tgz ┗ 📂weekly ┣ 📜bkp_2023-09-06.tgz ┣ 📜bkp_2023-09-13.tgz ┗ 📜bkp_2023-09-20.tgz
⭐️ Star this repository if you like it! ⭐️
You can also exclude files and folders from backup. Use filter option with patterns.
Example of backups-config.json:
{
"type": "local-storage",
"copies": {
"daily": 2,
"weekly": 1,
"monthly": 1,
"annually": 1
},
"filter": [
"node_modules/**",
"**/*.log",
"data/folder/*",
"package.lock",
"**/*_file-ending.*"
],
"compression_level": "default"
}
Type of backup, local or cloud
How many copies need to be in according folders, file tree will look like this:
📦backups ┣ 📂annually ┃ ┗ 📜bkp_2023-09-06.tgz ┣ 📂daily ┃ ┣ 📜bkp_2023-09-06.tgz ┃ ┗ 📜bkp_2023-09-10.tgz ┣ 📂monthly ┃ ┗ 📜bkp_2023-09-06.tgz ┗ 📂weekly ┃ ┗ 📜bkp_2023-09-06.tgz
- Exclude files inside node_modules folder recursively
- Exclude all .log files recursively
- Exclude all inside data/folder not-recursively
- Exclude package.lock
- Exclude files recursively by ending _fileending
default
: default compression, compromise between speed and compressionfast
: fastest compressionbest
: best and slowest compressionnone
: no compression
true
(default): ignores all .git, node_modules, vendor, etc folders; adds it to filter optionfalse
: does nothing
false
(default): does nothingtrue
: ignores records in .gitignore file; adds it to filter option
Mega provides a 20gb free space for your cloud backups. It's amazing! ✨
You just need the login and password to make a cloud backups working.
Config example:
{
"type": "mega-storage",
"email": "email-name@mail.me",
"password": "!test24passWord",
"backups_path": "path/to/backups/my-project",
"copies": {
"daily": 1
},
"filter": [
"**/*.log"
]
}
docker-compose.override.yml for Mega:
services:
super-easy-file-backups:
volumes:
- C:/Users/Adam/Desktop/Projects/gameServer:/app/projects/gameServer:ro
⭐️ Star this repository if you like it! ⭐️