Separate config file
Started implementing separate config file. Needs to be copied/linked manually to /etc/snapsh.conf
This commit is contained in:
parent
7ac0180fd6
commit
1770fe4e56
10
snapsh
10
snapsh
|
@ -18,13 +18,19 @@
|
||||||
|
|
||||||
# Environment set up:
|
# Environment set up:
|
||||||
|
|
||||||
|
if [[ -e /etc/snapsh.conf ]]; then
|
||||||
|
. /etc/snapsh.conf
|
||||||
|
else
|
||||||
TOPLEVEL="/root/btrfs-toplevel"
|
TOPLEVEL="/root/btrfs-toplevel"
|
||||||
SNAPSHOTS_LOCATION="/root/btrfs-toplevel/snapshots"
|
SNAPSHOTS_LOCATION="/root/btrfs-toplevel/snapshots"
|
||||||
|
|
||||||
BTRFS_EXECUTABLE=$(which btrfs)
|
TIMESTAMP="$(date +%Y.%m.%d-%H.%M.%S)"
|
||||||
TIMESTAMP=$(date +%Y.%m.%d-%H:%M:%S)
|
|
||||||
SUBVOLUME="root"
|
SUBVOLUME="root"
|
||||||
DESCRIPTION=""
|
DESCRIPTION=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
## In case of problems, define the path to the 'btrfs' executable here
|
||||||
|
BTRFS_EXECUTABLE=$(which btrfs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
## Snapsh requires the toplevel (subvolid=5) mounted somewhere
|
||||||
|
## You can define your mount point here.
|
||||||
|
## Default: "/root/btrfs-toplevel"
|
||||||
|
TOPLEVEL="/root/btrfs-toplevel"
|
||||||
|
|
||||||
|
## You should create a subvolume for snapshots. Snapsh will do this
|
||||||
|
## automatically, define the subvolume here. It is recommended
|
||||||
|
## to have the subvolume directly under the btrfs root (id=5)
|
||||||
|
## Use the full path
|
||||||
|
## Default: "/root/"
|
||||||
|
SNAPSHOTS_LOCATION="/root/btrfs-toplevel/snapshots"
|
||||||
|
|
||||||
|
## Timestamp format. See 'date --help' for formatting options.
|
||||||
|
## This will only be used for the name of the snapshot (=subvolume)
|
||||||
|
## created. E.g. with default setting snapshots will be created as
|
||||||
|
## "/root/btrfs-toplevel/snapshots/root_snapshot_2020_07_31-01.59.23"
|
||||||
|
## Default: $(date +%Y.%m.%d-%H.%M.%S)
|
||||||
|
TIMESTAMP="$(date +%Y.%m.%d-%H.%M.%S)"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Experimental:
|
||||||
|
## Define the list of subvolumes to be handled by snapsh here.
|
||||||
|
## Defaut: (root home)
|
||||||
|
SUBVOLUMES=(root home)
|
Loading…
Reference in New Issue