File: simplesession-nofuse

package info (click to toggle)
borgbackup2 2.0.0b20-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 16,848 kB
  • sloc: python: 33,830; pascal: 3,599; sh: 215; makefile: 160; tcl: 94; ansic: 21
file content (47 lines) | stat: -rwxr-xr-x 848 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash

#Fail on error
set -e

export HOME=$AUTOPKGTEST_TMP/home
mkdir "$HOME"
DATA=$AUTOPKGTEST_TMP/data
export BORG_REPO=$AUTOPKGTEST_TMP/borgrepo

cd $AUTOPKGTEST_TMP

borg() {
	borg2 "$@"
}

echo "Checking borg is callable"
borg --version

echo "Creating source data dir and mountpoint"
mkdir $DATA

echo "Calling borg repo-create"
borg repo-create --encryption none

# create source data

echo "Creating runone"
echo Hello, world > $DATA/file1
borg create runone data/

echo "Creating runtwo"
echo Hello again > $DATA/file2
borg create runtwo data/

echo "Listing archives"
borg repo-list

echo "Listing runone and runtwo contents"
borg list runone
borg list runtwo

echo "Testing borg extract --stdout"
borg extract --stdout runtwo data/file1 | grep -q "world"
borg extract --stdout runtwo data/file2 | grep -q "again"

echo "All good!"