Do not initialise buckets from restic-batch
This commit is contained in:
parent
2e32ea5c5d
commit
6954490bf4
@ -53,21 +53,11 @@ class Volume(abc.ABC):
|
||||
|
||||
try:
|
||||
# --------------------------------------------------------------------------------------
|
||||
# Check if bucket exists. If not, create and initialise the bucket.
|
||||
# Check if bucket exists.
|
||||
# --------------------------------------------------------------------------------------
|
||||
try:
|
||||
subprocess.run(self._restic_cmd_base + ["snapshots"],
|
||||
env=self._environ, check=True,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError as snapshots_err:
|
||||
try:
|
||||
ps = subprocess.run(self._restic_cmd_base + ["init"],
|
||||
env=self._environ, check=True,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
print(ps.stdout.decode("ascii"), flush=True)
|
||||
except subprocess.CalledProcessError:
|
||||
print(snapshots_err.stdout.decode("ascii"), flush=True)
|
||||
raise
|
||||
subprocess.run(self._restic_cmd_base + ["snapshots"],
|
||||
env=self._environ, check=True,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
# --------------------------------------------------------------------------------------
|
||||
# Perform the backup.
|
||||
|
Loading…
Reference in New Issue
Block a user