Code Monkey home page Code Monkey logo

Comments (5)

KenKundert avatar KenKundert commented on August 25, 2024

Modifying the config files for individual runs is not really the intended use-model. Would it be easier to simply modify the script?

from emborg.

adhawkins avatar adhawkins commented on August 25, 2024

That's possible, but currently the script essentially does:

for backup in /root/.config/emborg/*
do
    (emborg -c $backup create; emborg -c $backup prune) | Mail [email protected] -s "Borg backup for $backup"
done

Was looking for a way of disabling a particular backup for a while without having to move the settings file out of the directory.

from emborg.

KenKundert avatar KenKundert commented on August 25, 2024

The approach I would take would be to use the presence of a file to indicate that the backup is to be skipped. Something like:

for backup in /root/.config/emborg/*
do
    if [ -e ~/.config/emborg/$backup.skip ]
    then
        Mail [email protected] -s "Borg backup for $backup SKIPPED" < /dev/null
    else
        (emborg -c $backup create; emborg -c $backup prune) | Mail [email protected] -s "Borg backup for $backup"
    fi
done

Then to disable the home backup, you would simply create ~/.config/emborg/home.skip. So,

touch ~/.config/emborg/home.skip

to start skipping the backups, and

rm ~/.config/emborg/home.skip

to start backing it up again.

from emborg.

adhawkins avatar adhawkins commented on August 25, 2024

Yeah, that certainly one approach. I'll look into implementing that. Just thought the option might be worth doing. Obviously nobody else has asked for it!

from emborg.

KenKundert avatar KenKundert commented on August 25, 2024

I appreciate the suggestion. Some of my hesitation comes from the fact that is seems like kind of a dangerous option. My concern is that people will disable a backup and forget to re-enable it. Of course Emborg would probably emit a message saying that the backup is disabled, but such messages can get lost.

from emborg.

Related Issues (20)

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.