GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - DataLabTechTV/backup: Backup scripts and configs to help setup BorgBackup

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
lib
lib
 
 
libexec
libexec
 
 
output
output
 
 
systemd/user
systemd/user
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.org
README.org
 
 
justfile
justfile
 
 

Repository files navigation

backup

Backup scripts and configs to help setup BorgBackup

Requirements

  • just
  • borg

Quickstart

just config
just backup

And, if you want to install/uninstall as a systemd user service:

just install
just uninstall

Details

Customizing the Backup Period

The systemd user service runs on a timer that is set to every 30 minutes. You can change this by editing systemd/user/dlt-backup.timer directly before running just install.

Toaster Notification Options

By default, systemd/user/dlt-backup.service will run dlt-backup --notify --notify-once-daily~. You can either disable notifications completely, by removing both arguments, or enable notifications for all runs by removing --notify-once-daily. This option exists so that you get notified once per day, on the first successful run, so you can keep track of the backup service. For 30 minute periods, it would be annoying to get notified every time, so we included this option. You can edit these out from the source and run just install again (as many times as you need).

Summmary of Operations

This is essentially a glorified wrapper (a porcelain?) around borg, so that we can essentially run the following commands.

We initialize a borg repository, if it doesn’t exist and it’s safe to do so (no encryption by default):

borg init --encryption=none "$borg_repo"

We create a backup archive for the configured source directories (here src_dirs):

borg create \
    --verbose \
    --list \
    "$borg_repo::{now}" \
    "${src_dirs[@]}"

We remove old backups according to the configured retention policy. Default is to keep all backups for the day (since there is no file duplication, space is not an issue). We also keep a backup per day for the last week, a backup per week for the last month, and a backup per month for the last year.

borg prune \
    --list \
    --stats \
    --keep-within="${keep_within?}" \
    --keep-daily="${keep_daily?}" \
    --keep-weekly="${keep_weekly?}" \
    --keep-monthly="${keep_monthly?}" \
    "$borg_repo"

Finally, once pruning is run, we compact the repo to free up space:

borg compact "$borg_repo"

About

Backup scripts and configs to help setup BorgBackup

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.