Backup Script

Update: Over the last ~week dfm has had a few updates, cleanup, and bugfixes

Hey, I’ve got a backup script I use for my dots and want to share.

I’ve had it in varying states for some time but only recently got it to what I would call “stable”, and would love feedback or testing, here’s the bitbucket link

Stuff of note:

  • Has full CLI interface
  • Files are stored in the same file structure as copied files
  • Symbolic links are transformed to the file they are linked to
  • On first run, a blank config (~/.dfmrc) is created and initial setup begins
  • Auto Install req. packages on systems with pacman rsync and git
  • Using git is NOT required, setting REPO="" will skip git related steps and make local backup

There are probably some things I am forgetting or didn’t highlight so ask away

The config can be very simple and you may prefer editing by hand but it isn’t required.
Inside values (strings and arrays) are stored, it’s sourced and written to when running the script.

Here’s my config for reference

#!/usr/bin/env bash

# config for dotfile manager

# git repo https address (for cloning & pushing)

# branch setting, defaults to HEAD (currently checked out)

# directory where repo is located or will be cloned

# The following are the names for each directory inside BKP_DIR.
# Both will be created if needed & store files from the arrays below

# File paths which will be backed up to the directories above




I try it today with a local backup and it works flawlessly! Thank you for that. Greetings

1 Like

Thanks, this is going to help!

Works as advertised; thanks.

Awesome stuff