resticpy


Nameresticpy JSON
Version 1.2.1 PyPI version JSON
download
home_pagehttps://github.com/mtlynch/resticpy.git
SummaryRestic backup Python wrapper
upload_time2024-11-17 21:53:54
maintainerNone
docs_urlNone
authorMichael Lynch
requires_python>=3.7
licenseMIT
keywords backup
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # resticpy

[![PyPI](https://img.shields.io/pypi/v/resticpy)](https://pypi.org/project/resticpy/)
[![CircleCI](https://circleci.com/gh/mtlynch/resticpy.svg?style=svg)](https://circleci.com/gh/mtlynch/resticpy)
[![Coverage Status](https://coveralls.io/repos/github/mtlynch/resticpy/badge.svg?branch=master)](https://coveralls.io/github/mtlynch/resticpy?branch=master)
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](LICENSE)

## Overview

Minimal Python wrapper around the [restic](https://restic.readthedocs.io/) backup command-line interface.

## Installation

### From pip

```bash
pip install resticpy
```

### From source

```bash
git clone https://github.com/mtlynch/resticpy.git
cd resticpy
pip install .
```

## Quick start

### Create a password file

```bash
printf "mysecretpass" > password.txt
```

### Initialize a repository and back up a file

```python
import restic

restic.repository = '/tmp/backup1'
restic.password_file = 'password.txt'

restic.init()
restic.backup(paths=['some-file.txt'])
```

### Restore a snapshot

```python
import restic

restic.repository = '/tmp/backup1'
restic.password_file = 'password.txt'

restic.restore(snapshot_id='latest', target_dir='~/restored')
```

## API Documentation

<https://mtlynch.github.io/resticpy/>

## Example

I personally use this library for my backups. I've published my backup script at [mtlynch/mtlynch-backup](https://github.com/mtlynch/mtlynch-backup).

## Compatibility

resticpy is tested against [restic 0.17.1](https://github.com/restic/restic/releases/tag/v0.17.1).

## resticpy's scope and future

resticpy is maintained by [Michael Lynch](https://mtlynch.io) as a hobby project.

resticpy is **not** meant to achieve feature parity with restic. It is meant to cover a small subset of the most useful features of restic.

Due to time limitations, I keep resticpy's scope limited to only the features that fit into my workflows.

### Feature requests

I don't fulfill feature requests for resticpy. You are welcome to file a feature request for a third-party contributor to take on.

### Pull requests

I accept pull requests when they are:

- Documented
- Tested
- Small

I don't accept pull requests for features that look like they'll be a large maintenance burden.

## Acknowledgments

This project is forked from [jstzwj/PyRestic](https://github.com/jstzwj/PyRestic).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mtlynch/resticpy.git",
    "name": "resticpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "backup",
    "author": "Michael Lynch",
    "author_email": "michael@mtlynch.io",
    "download_url": "https://files.pythonhosted.org/packages/c9/fd/80083fcd311f4c1c574c13fc9318e8b60423eee1728a2a1c12727da2607a/resticpy-1.2.1.tar.gz",
    "platform": null,
    "description": "# resticpy\n\n[![PyPI](https://img.shields.io/pypi/v/resticpy)](https://pypi.org/project/resticpy/)\n[![CircleCI](https://circleci.com/gh/mtlynch/resticpy.svg?style=svg)](https://circleci.com/gh/mtlynch/resticpy)\n[![Coverage Status](https://coveralls.io/repos/github/mtlynch/resticpy/badge.svg?branch=master)](https://coveralls.io/github/mtlynch/resticpy?branch=master)\n[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](LICENSE)\n\n## Overview\n\nMinimal Python wrapper around the [restic](https://restic.readthedocs.io/) backup command-line interface.\n\n## Installation\n\n### From pip\n\n```bash\npip install resticpy\n```\n\n### From source\n\n```bash\ngit clone https://github.com/mtlynch/resticpy.git\ncd resticpy\npip install .\n```\n\n## Quick start\n\n### Create a password file\n\n```bash\nprintf \"mysecretpass\" > password.txt\n```\n\n### Initialize a repository and back up a file\n\n```python\nimport restic\n\nrestic.repository = '/tmp/backup1'\nrestic.password_file = 'password.txt'\n\nrestic.init()\nrestic.backup(paths=['some-file.txt'])\n```\n\n### Restore a snapshot\n\n```python\nimport restic\n\nrestic.repository = '/tmp/backup1'\nrestic.password_file = 'password.txt'\n\nrestic.restore(snapshot_id='latest', target_dir='~/restored')\n```\n\n## API Documentation\n\n<https://mtlynch.github.io/resticpy/>\n\n## Example\n\nI personally use this library for my backups. I've published my backup script at [mtlynch/mtlynch-backup](https://github.com/mtlynch/mtlynch-backup).\n\n## Compatibility\n\nresticpy is tested against [restic 0.17.1](https://github.com/restic/restic/releases/tag/v0.17.1).\n\n## resticpy's scope and future\n\nresticpy is maintained by [Michael Lynch](https://mtlynch.io) as a hobby project.\n\nresticpy is **not** meant to achieve feature parity with restic. It is meant to cover a small subset of the most useful features of restic.\n\nDue to time limitations, I keep resticpy's scope limited to only the features that fit into my workflows.\n\n### Feature requests\n\nI don't fulfill feature requests for resticpy. You are welcome to file a feature request for a third-party contributor to take on.\n\n### Pull requests\n\nI accept pull requests when they are:\n\n- Documented\n- Tested\n- Small\n\nI don't accept pull requests for features that look like they'll be a large maintenance burden.\n\n## Acknowledgments\n\nThis project is forked from [jstzwj/PyRestic](https://github.com/jstzwj/PyRestic).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Restic backup Python wrapper",
    "version": "1.2.1",
    "project_urls": {
        "Homepage": "https://github.com/mtlynch/resticpy.git",
        "repository": "https://github.com/mtlynch/resticpy"
    },
    "split_keywords": [
        "backup"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6024ab14faa6a0255cce466c00cc093f28e48021da81ee4bc51cc78c3feda8de",
                "md5": "e1d92631b917301c76e543424adcef36",
                "sha256": "06676bf88a06b4bc068055c74a0135a93b782c015c5a57ced4b2bc60837fdb06"
            },
            "downloads": -1,
            "filename": "resticpy-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e1d92631b917301c76e543424adcef36",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 26258,
            "upload_time": "2024-11-17T21:53:52",
            "upload_time_iso_8601": "2024-11-17T21:53:52.788044Z",
            "url": "https://files.pythonhosted.org/packages/60/24/ab14faa6a0255cce466c00cc093f28e48021da81ee4bc51cc78c3feda8de/resticpy-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c9fd80083fcd311f4c1c574c13fc9318e8b60423eee1728a2a1c12727da2607a",
                "md5": "214d07125774e744dba56af7b8016e83",
                "sha256": "e0cee238044235d178c50ef06ad577dfc9b7037a434686c69ae5ce09b08de039"
            },
            "downloads": -1,
            "filename": "resticpy-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "214d07125774e744dba56af7b8016e83",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16200,
            "upload_time": "2024-11-17T21:53:54",
            "upload_time_iso_8601": "2024-11-17T21:53:54.326299Z",
            "url": "https://files.pythonhosted.org/packages/c9/fd/80083fcd311f4c1c574c13fc9318e8b60423eee1728a2a1c12727da2607a/resticpy-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-17 21:53:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mtlynch",
    "github_project": "resticpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "lcname": "resticpy"
}
        
Elapsed time: 0.82434s