Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

A collection of scripts: LXC container backup, MySQL and Tar.gz backup scripts - these transfer the backup files to an FTP server

Notifications You must be signed in to change notification settings

ryanfitton/lxc-mysql-tar-backup-script-collection

Repository files navigation

Backup scripts

For LXC containers with MySQL and Tar.GZ file backup to remote FTP Servers

How to Use

  1. Ensure you have these packages installed:

    • netcat
    • exim4
    • lftp
    • curl
    sudo apt-get install netcat exim4 lftp curl
    
  2. Set your backup options, mainly for the remote FTP server in backup-config.sh

  3. Ensure each script is 'pulling in' the backup-config.sh file with the right path. Edit this line if your file is not being found:

    source '/backup-config.sh'
    
  4. Run your scripts. Amend the default values for your setup:

    • For LXC Container Snapshots:

       sudo ./backup-container-snapshot.sh 'yourlxdcontainername'
      
    • For MySQL Database dumps:

       sudo ./backup-mysqldump.sh 'yourfilename' 'yourdatabasehost' 'yourdatabaseuser' 'yourdatabasepassword'
      
    • For Tar.GZ file backups:

       sudo ./backup-tar-files.sh 'yourfilename' '/' '--exclude=/var/snap/lxd --exclude=/snap --exclude=/var/lib/lxd'
      

About

A collection of scripts: LXC container backup, MySQL and Tar.gz backup scripts - these transfer the backup files to an FTP server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages