Fixed code block
This commit is contained in:
parent
56375c80a0
commit
3782cdf528
18
README.md
18
README.md
|
@ -10,8 +10,9 @@ Bash wrapper for restic backups.
|
||||||
# Usage
|
# 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'
|
-a Run on all repos defined as 'auto'
|
||||||
-d dir Restore mode: specify where to put restored files (default: /mnt/restore)
|
-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 Test mode - dump what would be done then exit.
|
||||||
-T Telegram fornatting mode
|
-T Telegram fornatting mode
|
||||||
|
|
||||||
Valid commands are:
|
Valid commands are:
|
||||||
go ls init repos stats diff forget get check
|
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_ID=xxx # Backblaze B2 credentials
|
||||||
export B2_ACCOUNT_KEY=xxx # Backblaze B2 credentials
|
export B2_ACCOUNT_KEY=xxx # Backblaze B2 credentials
|
||||||
export B2_APP_ID=xxx # Backblaze B2 bucket details
|
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 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
|
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
|
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
|
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
|
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>)
|
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>)
|
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>)
|
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.
|
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>
|
nfs Mount $DEF_NFS_SERVER:$DEF_NFS_SERVER_BASE/<sharename> to <repopath>
|
||||||
before running. Sharename determined by stripping $NFS_PREFIX
|
before running. Sharename determined by stripping $NFS_PREFIX
|
||||||
from start of repo path.
|
from start of repo path.
|
||||||
|
@ -70,5 +71,6 @@ Bash wrapper for restic backups.
|
||||||
Sharename determined by stripping $NFS_PREFIX from start of <repopath>.
|
Sharename determined by stripping $NFS_PREFIX from start of <repopath>.
|
||||||
localmount Run 'mount reponame' to mount <path_to_files> before running.
|
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.
|
premount=x Run 'mount <x>' before command and 'umount x' afterwards.
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue