Lxmin - Backup and Restore LXC instances from MinIO

lxmin

Backup and restore LXC instances from MinIO

Usage

NAME:
  lxmin - backup and restore LXC instances from MinIO

USAGE:
  lxmin [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]

COMMANDS:
  backup      backup an instance image to MinIO
  restore     restore an instance image from MinIO
  list, ls    list all backups from MinIO
  delete, rm  deletes a specific backup by 'name' for an instance from MinIO

GLOBAL FLAGS:
  --endpoint value    endpoint for S3 API call(s) [$LXMIN_ENDPOINT]
  --bucket value      bucket on MinIO to save/restore backup(s) [$LXMIN_BUCKET]
  --access-key value  access key credential for S3 API [$LXMIN_ACCESS_KEY]
  --secret-key value  secret key credential for S3 API [$LXMIN_SECRET_KEY]
  --help, -h          show help

Setup

Enable MinIO endpoint, bucket and access credentials.

export LXMIN_ENDPOINT=http://localhost:9000
export LXMIN_BUCKET="backups"
export LXMIN_ACCESS_KEY="minioadmin"
export LXMIN_SECRET_KEY="minioadmin"

Create a backup

lxmin backup u2
Exporting backup from lxc backup_2022-02-16-04-1040.tar.gz... Done
Uploading backup_2022-02-16-04-1040.tar.gz [==========================================================================================================================] 101.25 MiB/s

List all backups

lxmin list u2
+----------+----------------------------------+-------------------------------+---------+
| INSTANCE |               NAME               |            CREATED            |  SIZE   |
+----------+----------------------------------+-------------------------------+---------+
| u2       | backup_2022-02-15-18-2642.tar.gz | Tue, 15 Feb 2022 18:28:04 GMT | 653 MiB |
| u2       | backup_2022-02-15-18-4259.tar.gz | Tue, 15 Feb 2022 18:44:21 GMT | 653 MiB |
| u2       | backup_2022-02-15-21-0930.tar.gz | Tue, 15 Feb 2022 21:10:53 GMT | 654 MiB |
| u2       | backup_2022-02-16-04-0841.tar.gz | Wed, 16 Feb 2022 04:10:05 GMT | 654 MiB |
| u2       | backup_2022-02-16-04-1040.tar.gz | Wed, 16 Feb 2022 04:12:04 GMT | 654 MiB |
+----------+----------------------------------+-------------------------------+---------+

Restore a backup

lxmin restore u2 backup_2022-02-16-04-1040.tar.gz
Downloading backup_2022-02-16-04-1040.tar.gz [========================================================================================================================] 212.41 MiB/s
Importing instance 'u2', from 'backup_2022-02-16-04-1040.tar.gz'... Done
Starting instance 'u2'... Done

Delete a backup

Delete a specific backup by name backup_2022-02-16-04-1040.tar.gz

lxmin delete u2 backup_2022-02-16-04-1040.tar.gz
Backup backup_2022-02-16-04-1040.tar.gz deleted successfully

Delete all backups

lxmin delete u2 --all --force
All backups for u2 deleted successfully
Owner
Multi-Cloud Object Storage
MinIO offers high-performance, S3 compatible object storage. Native to Kubernetes
Multi-Cloud Object Storage
Comments
  • Restore to different name

    Restore to different name

    Hello and thank you for, what seems, great tool.

    I would like to have:

    • restore to different name: lxmin restore cont cont2 backup_2022-05-11-18-1704 (where cont is current container running and cont2 is new, non-existing one)
    • similar to above, have --force or similar to overwrite existing container/vm
    • have (global) configuration file instead of export variables

    A.

  • Add notify-endpoint CLI/Env option

    Add notify-endpoint CLI/Env option

    • Fixes an existing issue where if the notification endpoint is not specified in the REST API call, the operation appears to fail silently.

    • If not specified in the REST API call, this value is used.

    • If no notify-endpoint is given, an error is without performing the backup/restore operation.

    • Improve some error messages.

  • Backup and restore profiles along with an instance

    Backup and restore profiles along with an instance

    • All profiles associated with an instance are backed up to yaml files preserving their order.

    • On restore, a profile that already exists is skipped (not overwritten).

    • Listing now shows the name of the backup rather than the name of the tar file.

  • call notifyEndpoint only at the end of each operation

    call notifyEndpoint only at the end of each operation

    Some API clients might send a state in the notifyEndpoint, to be round tripped when lxmin performs the callback. If this state contains a nonce and lxmin performs the callback twice, the second callback will fail because the nonce was already consumed in the first.

    By deleting the first callback and leaving only the last one, API clients can rely on the HTTP response to get feedback on the operation creation, and in the callback at the end to know how it went.

  • url decode the notifyEndpoint query param

    url decode the notifyEndpoint query param

    I believe the notifyEndpoint needs to be query unescaped before being used. Ie:

    POST /1.0/instances/instancename/backups?notifyEndpoint=http%3A%2F%2Flocalhost%3A9999%2Flxmincallback%26state%3DInYUx3KYSZhq_E95Btpgd9sjzqVLrFIaGTvsBrEFpsKJPQqgFoWBsv1VY5CNsvqHlVI214ggMCxV9ApBMx8aeKfeESj-VAjZTEmeAZGTNlBhRWHCWWTws0I_af36Ddv7-8FQHPu15PiKxznKVf5MAFnj_DuL4EIa2Hoj605KBrzl05iWfJ460iOkD4hW4-j5EvPRyGOuTs_OTVIu1TShlE0GU4e9IrB6MWqmjQwg8sXW2yqflJ-vXaqnTcsd5sAzD3_nV6lPcxGdioTZ8bq0EWmFNTnVSNP-bGiD1oEADWiGDkzXfpqfB8siNmSYejZOgBUy09Bpo6QDX8HbMqhJxt2JJ61enGIvuzX0poMDWyVd3eDen6ox1UyRo4XExkPmSR5nXw%3D%3D
    

    would result in a callback request to

    http%3A%2F%2Flocalhost%3A9999%2Flxmincallback%26state%3DInYUx3KYSZhq_E95Btpgd9sjzqVLrFIaGTvsBrEFpsKJPQqgFoWBsv1VY5CNsvqHlVI214ggMCxV9ApBMx8aeKfeESj-VAjZTEmeAZGTNlBhRWHCWWTws0I_af36Ddv7-8FQHPu15PiKxznKVf5MAFnj_DuL4EIa2Hoj605KBrzl05iWfJ460iOkD4hW4-j5EvPRyGOuTs_OTVIu1TShlE0GU4e9IrB6MWqmjQwg8sXW2yqflJ-vXaqnTcsd5sAzD3_nV6lPcxGdioTZ8bq0EWmFNTnVSNP-bGiD1oEADWiGDkzXfpqfB8siNmSYejZOgBUy09Bpo6QDX8HbMqhJxt2JJ61enGIvuzX0poMDWyVd3eDen6ox1UyRo4XExkPmSR5nXw%3D%3D
    

    when instead it should be

    http://localhost:9999/lxmincallback&state=InYUx3KYSZhq_E95Btpgd9sjzqVLrFIaGTvsBrEFpsKJPQqgFoWBsv1VY5CNsvqHlVI214ggMCxV9ApBMx8aeKfeESj-VAjZTEmeAZGTNlBhRWHCWWTws0I_af36Ddv7-8FQHPu15PiKxznKVf5MAFnj_DuL4EIa2Hoj605KBrzl05iWfJ460iOkD4hW4-j5EvPRyGOuTs_OTVIu1TShlE0GU4e9IrB6MWqmjQwg8sXW2yqflJ-vXaqnTcsd5sAzD3_nV6lPcxGdioTZ8bq0EWmFNTnVSNP-bGiD1oEADWiGDkzXfpqfB8siNmSYejZOgBUy09Bpo6QDX8HbMqhJxt2JJ61enGIvuzX0poMDWyVd3eDen6ox1UyRo4XExkPmSR5nXw==
    
Related tags
Dgraph Backup and Restore (cloud). Read-only mirror.

dgbrx Dgraph Backup and Restore X dgbrx is a Go commandline tool which helps to do a backup, restore or clean on a Dgraph Cloud (aka slash / managed)

Oct 28, 2021
Kubegres is a Kubernetes operator allowing to create a cluster of PostgreSql instances and manage databases replication, failover and backup.

Kubegres is a Kubernetes operator allowing to deploy a cluster of PostgreSql pods with data replication enabled out-of-the box. It brings simplicity w

Dec 30, 2022
A simple application, demo at this point, on how to pull a backup from Collibra on prem (say for Cohesity backup)
A simple application, demo at this point, on how to pull a backup from Collibra on prem (say for Cohesity backup)

go-get-collibra-backup Introduction This repository is a very simple go application that's intended, at this point, more of a demonstration about how

Dec 10, 2021
Lightweight, single-binary Backup Repository client. Part of E2E Backup Architecture designed by RiotKit

Backup Maker Tiny backup client packed in a single binary. Interacts with a Backup Repository server to store files, uses GPG to secure your backups e

Apr 4, 2022
A tool to dump and restore Prometheus data blocks.
A tool to dump and restore Prometheus data blocks.

promdump promdump dumps the head and persistent blocks of Prometheus. It supports filtering the persistent blocks by time range. Why This Tool When de

Dec 16, 2022
This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances

Session Manager Plugin This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances. Sess

Dec 28, 2022
Tape backup software optimized for large WORM data and long-term recoverability

Mixtape Backup software for tape users with lots of WORM data. Draft design License This codebase is not open-source software (or free, or "libre") at

Oct 30, 2022
Kstone is an etcd management platform, providing cluster management, monitoring, backup, inspection, data migration, visual viewing of etcd data, and intelligent diagnosis.
Kstone is an etcd management platform, providing cluster management, monitoring, backup, inspection, data migration, visual viewing of etcd data, and intelligent diagnosis.

Kstone δΈ­ζ–‡ Kstone is an etcd management platform, providing cluster management, monitoring, backup, inspection, data migration, visual viewing of etcd

Dec 27, 2022
Cloud-Z gathers information and perform benchmarks on cloud instances in multiple cloud providers.

Cloud-Z Cloud-Z gathers information and perform benchmarks on cloud instances in multiple cloud providers. Cloud type, instance id, and type CPU infor

Jun 8, 2022
πŸ›… Backup your Kubernetes Stateful Applications

Stash Stash by AppsCode is a cloud-native data backup and recovery solution for Kubernetes workloads. If you are running production workloads in Kuber

Jan 7, 2023
go-awssh is a developer tool to make your SSH to AWS EC2 instances easy.

Describing Instances/VPCs data, select one or multiple instances, and make connection(s) to selected instances. Caching the response of API calls for 1day using Tmpfs.

Oct 11, 2021
A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instances.

Grafana Dashboard Synchronization Backend Plugin A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instance

Dec 23, 2022
Simple wrapper around multiple fs.FS instances, recursively merging them together dynamically.

go-layerfs This is a simple wrapper around multiple fs.FS instances, recursively merging them together dynamically. If you have two directories, of wh

Aug 9, 2022
Automatically stop GCE instances
Automatically stop GCE instances

auto-stop-gce-instances Architecture How to deploy 1. Deploy Pub/Sub $ gcloud pubsub topics create $PUBSUB_NAME 2. Deploy Cloud Functions $ gcloud fu

Nov 28, 2021
A library for writing backup programs in Golang

Barkup godoc.org/github.com/keighl/barkup Barkup is a library for backing things up. It provides tools for writing bare-bones backup programs in Go. T

Nov 13, 2022
Simple SFTP backup tool for files.

BakTP Simple SFTP backup tool for files. config.example.json Contains an example how to backup a database. This application can be added to crontab -e

Dec 30, 2021
Create AWS Auto Scaling groups from running instances or AMIs automatically.

AWS Auto Scaling Groups Builder AWS Auto Scaling group is a great way of managing Amazon EC2 instances. AWS Auto Scaling group watches the correspondi

Oct 7, 2022
WaffleSyrup - Simple backup solution written by Go.

WaffleSyrup Simple backup solution written by Go. Usage WaffleSyrup runs in the current working directory. It will create ./tmp directory to save tarb

Apr 22, 2022
Drain-my-spot - Service draining the k8s worker node in case of spot instances related event occurrence

drain-my-spot Service draining the k8s worker node in case of spot instances rel

Feb 5, 2022