Skip to content

flintman/backup_tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPDX-License-Identifier: MIT

Copyright (c) 2025 William C. Bellavance Jr.

Backup Manager C++

Backup manager, Reads configuration from backup.env if present in each HOME folder, performs MySQL (docker or host) dumps, archives directories, pushes to a remote backup server via SSH/SCP (using sshpass), optionally handles Nextcloud maintenance mode, and sends Telegram notifications.

Build

Requirements: g++, make,

make deb

Config

Edit /home/INSTALL_USER/backup/backup.env. Keys include:

  • IS_DOCKER, IS_MYSQL, IS_NEXTCLOUD
  • SERVER_NAME
  • BACKUP_SERVER_USERNAME, BACKUP_SERVER_PASSWORD, BACKUP_SERVER_IP, BACKUP_SERVER_DEST
  • BACKUP_FILES_DIR, BACKUP_SQL_DIR
  • MYSQL_USERNAME, MYSQL_PASSWORD
  • BOT_ID, CHANNEL_ID
  • NEXTCLOUD_OCC_USER, NEXTCLOUD_PATH
  • DATABASES_DOCKER_NAME, DATABASESNAME, DATABASESUSER, DATABASES_PASSWORD,
  • TOTAL_BACKUPS_TO_KEEP

Run

sudo bmanager

Cron

Example crontab entry (run daily at 02:30):

30 2 * * * bmanager > /home/USER/backup/log/backup.log 2>&1

About

This is my backup tool used to backup my servers.

Resources

License

Stars

Watchers

Forks