Fixed code block

This commit is contained in:
Rob Pearce 2021-06-03 10:07:47 +10:00
parent 56375c80a0
commit 3782cdf528
1 changed files with 51 additions and 49 deletions

View File

@ -10,8 +10,9 @@ Bash wrapper for restic backups.
# Usage
root@gridbug:bare# ./bare.sh -h
usage: ./bare.sh command reponame
```
root@gridbug:bare# ./bare.sh -h
usage: ./bare.sh command reponame
-a Run on all repos defined as 'auto'
-d dir Restore mode: specify where to put restored files (default: /mnt/restore)
@ -22,10 +23,10 @@ Bash wrapper for restic backups.
-t Test mode - dump what would be done then exit.
-T Telegram fornatting mode
Valid commands are:
Valid commands are:
go ls init repos stats diff forget get check
/root/.backup/config should look like this:
/root/.backup/config should look like this:
export B2_ACCOUNT_ID=xxx # Backblaze B2 credentials
export B2_ACCOUNT_KEY=xxx # Backblaze B2 credentials
export B2_APP_ID=xxx # Backblaze B2 bucket details
@ -48,7 +49,7 @@ Bash wrapper for restic backups.
export DEF_NFS_SERVER_BASE=/remote/nfs/share/base # Path on local NFS server to prefix to repo names
export NFS_PREFIX=/local/nfs/mountpoint # Where to mount NFS exports locally before backing them up
/root/.backup/repos should look like this:
/root/.backup/repos should look like this:
reponame1;/path/to/files1/;tag1,tag2,...,tagX;repo_url;repo_passfile;repo_excludefile
reponame2;/path/to/files2/;tag1,tag2,...,tagX;repo_url;repo_passfile;repo_excludefile
...
@ -56,13 +57,13 @@ Bash wrapper for restic backups.
Default password file is: /root/.backup/auth
Backup method tags:
Backup method tags:
restic Backup using restic (default repo is Backblaze B2 bucket $B2_BUCKET_PREFIX-<reponame>)
rclone Backup using rclone (default repo is Backblaze B2 bucket $B2_BUCKET_PREFIX-<reponame>)
rsync Backup using rsync (default repo is $DEF_RSYNC_USER@$DEF_RSYNC_SERVER:$DEF_RSYNC_DIR/<reponame>)
postgres Dump all postgres databases. Instead of local file path, specify database name to backup. If empty, all dbs are backed up.
Pre-backup commands to access local files:
Pre-backup commands to access local files:
nfs Mount $DEF_NFS_SERVER:$DEF_NFS_SERVER_BASE/<sharename> to <repopath>
before running. Sharename determined by stripping $NFS_PREFIX
from start of repo path.
@ -70,5 +71,6 @@ Bash wrapper for restic backups.
Sharename determined by stripping $NFS_PREFIX from start of <repopath>.
localmount Run 'mount reponame' to mount <path_to_files> before running.
Pre-backup commands to access repo:
Pre-backup commands to access repo:
premount=x Run 'mount <x>' before command and 'umount x' afterwards.
```