Skip to main content

No project description provided

Project description

edwh-restic-plugin

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install edwh-restic-plugin

But probably you want to install the whole edwh package:

pipx install edwh[plugins,omgeving]

restic.backup

To backup a file use the inv backup command

arguments for the inv backup

  • connection_choice=SERVICE
  • snapshot = "latest" by default, see snapshots for more info
  • message | send a message with the backup, default is datetime.localtime()
  • verbose | print logs

example for backing up files without using streams:

restic $HOST -r $URI backup --tag files *.sh

example for backing up files using streams:

echo "hi" | restic $HOST -r $URI backup --tag stream --stdin --stdin-filename pg_dump.sql

NOTE: put restore commands as an .sh file in a folder named captain-hooks, the folder needs to be in the same dir you run the inv restore in. SEE examples/captain-hooks for more info

variables you can use in the restore sh file

  • $HOST
  • $URI

restic.restore

To restore a backup use the inv restore command

arguments for the inv restore

  • connection_choice=SERVICE
  • snapshot = "latest" by default, see snapshots for more info
  • target | location where the backup will go to
  • verbose | print logs

example for restoring files without using streams:

restic $HOST -r $URI restore latest --target recover_data --tag files

example for restoring files using streams:

restic $HOST -r $URI dump $SNAPSHOT --tag stream pg_dump.sql

NOTE: put restore commands as an .sh file in a folder named captain-hooks, the folder needs to be in the same dir you run the inv restore in. See examples/captain-hooks for more info

variables you can use in the restore sh file

  • $HOST
  • $URI
  • $SNAPSHOT

restic.snapshots

list of all backups that are made

example command: inv snapshots -c local

Gebruikt connectie:  local
ID        Time                 Host     Tags
------------------------------------------------
71cde9e8  2023-04-05 17:49:21  sven-hp  stream : [hello world!]
d845dc99  2023-04-05 17:49:21  sven-hp  message
                                        71cde9e8
------------------------------------------------
2 snapshots

License

edwh-restic-plugin is distributed under the terms of the MIT license. See the license for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edwh_restic_plugin-0.1.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

edwh_restic_plugin-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file edwh_restic_plugin-0.1.0.tar.gz.

File metadata

  • Download URL: edwh_restic_plugin-0.1.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for edwh_restic_plugin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f6db6f36e1f3d3fb4f125764a0ab9e51aafc5243adb94a2fca6431c26559b2f8
MD5 954ad8e9607c5d3fe3a3e3e8366dcd4a
BLAKE2b-256 16d993d2b5faa092091881200936aef9a28399a1912f442fe7779641207d7ca6

See more details on using hashes here.

File details

Details for the file edwh_restic_plugin-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for edwh_restic_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfc77d787dd76a3d74f90bc143225bec1d1e41ca9484ceba30dd87c1ecc17860
MD5 430917f30c4d3fa12233ea10057440e2
BLAKE2b-256 7f7237dcf092d2d1bfda500f82ae82c90eb5490cf474cbc11678707f4b5c3a9d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page