aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-23 12:16:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-23 12:16:11 -0300
commitc7d6bdbe9f30e4704ed75719cb2e918943fe2395 (patch)
tree2c042cba628313c4c38e8c9c81bf8a1e8e936d37
parentcc8ee49c5f4ed9bd47c54beeb69095065710b27a (diff)
downloadborger-c7d6bdbe9f30e4704ed75719cb2e918943fe2395.tar.gz
borger-c7d6bdbe9f30e4704ed75719cb2e918943fe2395.tar.bz2
Updates README and some cleanup
-rw-r--r--ChangeLog0
-rw-r--r--Makefile47
-rw-r--r--README.md45
-rw-r--r--TODO.md2
-rwxr-xr-xborger22
5 files changed, 43 insertions, 73 deletions
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index e69de29..0000000
--- a/ChangeLog
+++ /dev/null
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 6dbbd98..0000000
--- a/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Global Makefile - https://templater.fluxo.info
-#
-# This Makefile contains basic, common targets and also includes
-# any Makefile.* available in the current folder.
-#
-
-# Port to serve content
-HTTP_PORT="8000"
-HTTP_SERVER="SimpleHTTPServer"
-
-# Set CONTAINER based in what we have available in the system
-# This variable can be user in other, included Makefiles to handle virtualization tasks
-ifeq ($(shell which kvmx > /dev/null && test -s kvmxfile && echo yes), yes)
- CONTAINER = kvmx
-else ifeq ($(shell which vagrant > /dev/null && test -s Vagrantfile && echo yes), yes)
- CONTAINER = vagrant
-else ifeq ($(shell which docker > /dev/null && test -s Dockerfile && echo yes), yes)
- CONTAINER = docker
-else
- CONTAINER = ''
-endif
-
-# See http://unix.stackexchange.com/questions/32182/simple-command-line-http-server#32200
-# http://php.net/manual/en/features.commandline.webserver.php
-serve:
- @if [ "$(HTTP_SERVER)" = "SimpleHTTPServer" ]; then python -m SimpleHTTPServer $(HTTP_PORT); fi
- @if [ "$(HTTP_SERVER)" = "ssi_server" ]; then PYTHONDONTWRITEBYTECODE=0 ssi_server.py $(HTTP_PORT); fi
- @if [ "$(HTTP_SERVER)" = "http.server" ]; then python3 -m http.server $(HTTP_PORT); fi
- @if [ "$(HTTP_SERVER)" = "php" ]; then php -S localhost:$(HTTP_PORT); fi
-
-# Configure a git post-receive hook
-post_receive:
- git config receive.denyCurrentBranch ignore
- test -s bin/post-receive && cd .git/hooks && ln -sf ../../bin/post-receive
-
-# Process any other Makefile whose filename matches Makefile.*
-# See https://www.gnu.org/software/make/manual/html_node/Include.html
-#
-# Some of those files might even contain local customizations/overrides
-# that can be .gitignore'd, like a Makefile.local for example.
--include Makefile.*
-
-# Customization examples can be as simple as setting variables:
-#CONTAINER = vagrant
-#CONTAINER = docker
-#DESTDIR ?= vendor
diff --git a/README.md b/README.md
index 22d1f89..483bc95 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,43 @@
-borger
-======
+# Borger
+
+A script for home folder backups using [Borg](https://borgbackup.readthedocs.io).
+
+# Features
+
+* Multiple destinations using config files.
+* Automatically initializes repository in the remote destination.
+* Automatically pruning of old backups.
+
+# Usage
+
+Create a config for your `servername` destination at `~/.config/borger/servername`:
+
+ # Backup destination
+ export SSH_SERVER="user@host"
+ export SSH_PORT="2202"
+
+ # Repository path
+ export BORG_REPO_DIR="/var/backups/users/$USER/borg"
+ export BORG_REPO="ssh://$SSH_SERVER:$SSH_PORT/$BORG_REPO_DIR"
+
+ # Setting one of those, so you won't be asked for your repository passphrase:
+ #export BORG_PASSPHRASE='HACKME'
+ #export BORG_PASSCOMMAND='pass show backup'
+ #export BORG_PASSCOMMAND='keyringer default decrypt borg 2> /dev/null'
+
+ # Backup config
+ keepdaily="7"
+ keepweekly="4"
+ keepmonth="6"
+ encryption="keyfile"
+ placeholder="{user}"
+
+Then run borger:
+
+ borger servername
+
+# Checking your backups
+
+As simply as
+
+ borger servername --check
diff --git a/TODO.md b/TODO.md
deleted file mode 100644
index 74e5cc0..0000000
--- a/TODO.md
+++ /dev/null
@@ -1,2 +0,0 @@
-TODO
-====
diff --git a/borger b/borger
index 990c493..0d167ca 100755
--- a/borger
+++ b/borger
@@ -2,28 +2,6 @@
#
# Borg script for home folder backups.
# Adapted from https://borgbackup.readthedocs.io/en/stable/quickstart.html#automating-backups
-#
-# Example config to be put at ~/.config/borger/destination-name:
-#
-# # Backup destination
-# export SSH_SERVER="user@host"
-# export SSH_PORT="2202"
-#
-# # Repository path
-# export BORG_REPO_DIR="/var/backups/users/$USER/borg"
-# export BORG_REPO="ssh://$SSH_SERVER:$SSH_PORT/$BORG_REPO_DIR"
-#
-# # Setting this, so you won't be asked for your repository passphrase:
-# #export BORG_PASSPHRASE='HACKME'
-# #export BORG_PASSCOMMAND='pass show backup'
-# #export BORG_PASSCOMMAND='keyringer default decrypt pessoal/backups/borg 2> /dev/null'
-#
-# # Backup config
-# keepdaily="7"
-# keepweekly="4"
-# keepmonth="6"
-# encryption="keyfile"
-# placeholder="{user}"
# Parameters
BASENAME="`basename $0`"