Skip to content

Create a config.toml and run to backup your website

License

Notifications You must be signed in to change notification settings

lil5/go-site-bk

Repository files navigation

Site backup

A backup script that compresses, encrypts and uses Toml as config

Encryption is done with GPG. Compression with Tar and Gzip.

This binary with create bash shells to run most commands.

Dependencies

  • gpg
  • rsync
  • ssh
  • tar
  • bash

ℹ️ MySQL backups MySQL or MariaDB backups require mysqldump on the webserver.

Install

Download the bk-linux-amd64 (or the binary conforming with your PC) binary from the releases, move it to your desired location.

Usage

✏️ Copy config-example.toml to config.toml and change the values.

⚡ Run the binary from the location of the config.toml.

🍵 Drink some green tea while waiting for the script to finish executing.

☁️ Copy the archive-example-2021-04-04-130001.tar.gz.gpg to your favourite untrusted cloud drive 🙊.

❤️ Star this project.

Security

A .cache directory is created to include an unencrypted copy of the last backup to decrease the MB's rsynced over next backup.

The encrypted archives can be safely move to any 3rd party cloud file hosting company.

Decrypt files

To decrypt archives run:

gpg -d archive-<site_name>-<datetime>.tar.gz.gpg | tar -xvzf -

Links