GithubHelp home page GithubHelp logo

Comments (5)

cerebrux avatar cerebrux commented on June 15, 2024 3

I was able to create a shell script that uses the vackup script. This way I can backup all volumes on the system. Look:

Thanks for your script. I managed to create a systemd service with your script to automate the backup once every day. If anyone is interested : Vackup all

from docker-vackup.

BretFisher avatar BretFisher commented on June 15, 2024 1

Hey there. I don't think this will need many (or any) updates because 1. it's just bash and 2. it's just basic docker commands that have worked for 10 years without edits.

In real storage, you usually need more than a file copy for backups. Databases all have their own backup tools to ensure you get proper backups, and backup systems usually are on a schedule, do retries, etc. This script isn't meant to replace a full backup system, but just an easy way to copy volumes from one system to another.

from docker-vackup.

cairoapcampos avatar cairoapcampos commented on June 15, 2024 1

I was able to create a shell script that uses the vackup script. This way I can backup all volumes on the system. Look:

#!/bin/bash

# Note: Before running this script, install the Vackup command,
# installation information can be found at the link below:
# https://github.com/BretFisher/docker-vackup

clear

## Variables
volumes=$(docker volume ls -q)
dts=$(date +%d%m%y_%H%M%S)
pathroot=/backup
pathbkp=$pathroot/$dts

## Remove subfolders from the backup directory that are more than 7 days old
find $pathroot -mindepth 1 -maxdepth 1 -type d -mtime +7 -exec rm -r {} \;

## Create and enter the backup directory
mkdir $pathbkp && cd $pathbkp

## Backing up volumes and creating backup logs
for volume in $volumes
do
    /usr/local/bin/vackup export $volume $volume.tar.gz | tee log_$volume.txt
done

from docker-vackup.

cairoapcampos avatar cairoapcampos commented on June 15, 2024 1

@cerebrux I'm very happy to know that my script was useful to you.

from docker-vackup.

Guiorgy avatar Guiorgy commented on June 15, 2024

In case anybody is interested, I'm using this script to backup all my containers. The main differences are, that the script stops all running containers before copying the volumes and restarting stopped containers, and also that it uses the docker-autocompose script as well to generate a compose file with all containers.

from docker-vackup.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.