borg-remote-android/README.md

1.8 KiB

borg-remote-android

A utility for easy android backups using rsync (locally) and borg (on a remote).

Motivation

I was having trouble installing borg (even though there was borgbackup_on_android) and running borg was slow since I was using lzma compression.

I created this tool so that the copy to the server could be quick, then the server could perform the heavy lifting of encryption/compression. This also allows for less required time on WiFi, since the only network-intensive operations are on the resumable rsync transfer.

Usage

In Termux, run:

./backup-android.sh

and it will notify you when complete.

Alternatively, you can add a Termux widget to your home screen (./setup.sh auto-installs in the .shortcuts directory), so backups can be made with a single tap from the home screen.

Installation

1 line installation:

curl -Ls https://linx.austenwares.com/selif/0182lycx.sh | bash

Manual 4 line installation:

# Install rsync/git/ssh only if they aren't already present
{ command -v rsync && command -v git && command -v ssh; } >/dev/null || { apt update && apt install -y git rsync openssh; }
git clone https://gitea.austenwares.com/stonewareslord/borg-remote-android
env bash borg-remote-android/setup.sh

Manual one-liner:

{ command -v rsync && command -v git && command -v ssh; } >/dev/null || { apt update && apt install -y git rsync openssh; } && git clone https://gitea.austenwares.com/stonewareslord/borg-remote-android && env bash borg-remote-android/setup.sh

QR code installation (paste into Termux)

Updating

The entire config is stored in env, which is in .gitignore, so running a simple git pull will update without losing custom changes.