k8s-backup-scheduler

command module
v0.0.0-...-643c446 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

README

Simple Kubernetes Persistent Volume Backup with Scheduling

Prerequisite

Given this needs access to your Kubernetes cluster to backup a volume it would require an authenticated context. The running docker container assumes a working Kubernetes config file at $HOME/.kube/config to do work.

Quick run kubebackup CLI

# build the cli for your environment if needed
go build -o kubebackup .

# copy over the executable to your system's bin folder
sudo cp ./kubebackup /usr/local/bin/kubebackup

# See all commands
kubebackup help

# See the backup command
kubebackup backup --help

Backup Scheduling

For scheduled backups, just swap out the Kubernetes Job specification with a CronJob

Quick Local Development

# build the docker image locally
./buildDockerImage.sh

# Run the built docker image as a local container
./runDockerDev.sh

# Run the main file inside the container with the 'help' argument
go run ./main.go help

# Use '--help' for a command to get command specific flags
go run main.go backup --help

# use DEBUG environment variable if needed
DEBUG=1 go run main.go backup --help

Documentation

Overview

Copyright 2022 Anton Mamonov <hi@antonmamonov.com> GNU GENERAL PUBLIC LICENSE

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL