{"id":21275669,"url":"https://github.com/halimath/rsbackup","last_synced_at":"2025-03-15T13:13:47.078Z","repository":{"id":37026686,"uuid":"492975153","full_name":"halimath/rsbackup","owner":"halimath","description":"rsync based backup for unix","archived":false,"fork":false,"pushed_at":"2023-05-21T16:22:08.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T05:33:47.789Z","etag":null,"topics":["backup","backup-utility","backups","python","python3","rsync"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halimath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-16T19:37:26.000Z","updated_at":"2022-05-19T18:02:48.000Z","dependencies_parsed_at":"2024-11-21T09:46:16.146Z","dependency_job_id":null,"html_url":"https://github.com/halimath/rsbackup","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halimath%2Frsbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halimath%2Frsbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halimath%2Frsbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halimath%2Frsbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halimath","download_url":"https://codeload.github.com/halimath/rsbackup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243732303,"owners_count":20338839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","backup-utility","backups","python","python3","rsync"],"created_at":"2024-11-21T09:36:05.032Z","updated_at":"2025-03-15T13:13:47.052Z","avatar_url":"https://github.com/halimath.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rsbackup\n\n[![CI Status](https://github.com/halimath/rsbackup/workflows/CI/badge.svg)](https://github.com/halimath/rsbackup/actions/workflows/ci.yaml)\n[![Releases](https://img.shields.io/github/v/release/halimath/rsbackup.svg)](https://github.com/halimath/rsbackup/releases)\n[![PyPi](https://img.shields.io/pypi/v/rsbackup.svg)](https://pypi.org/project/rsbackup/)\n[![Wheel](https://img.shields.io/pypi/wheel/rsbackup.svg)](https://pypi.org/project/rsbackup/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/rsbackup.svg)](https://pypi.org/project/rsbackup/)\n\nA simple rsync-based backup solution for unix systems.\n\n`rsbackup` is a simple python application that uses `rsync` to create backups with support for hard links on\nincremental backups.\n\n# Installation\n\n`rsbackup` requires a working installation of Python 3.10 and the `rsync` command line tool. `rsbackup` uses only `rsync` flags\nsupported on both Linux and BSD versions (i.e. MacOS) of `rsync`.\n\nUse the following command to install `rsbackup`:\n\n```shell\npip install rsbackup\n```\n\n# Usage\n\n`rsbackup` reads backup configurations from a configuration [TOML](https://toml.io/en/) file. The default \nfilename to read is `$HOME/.config/rsbackup.toml` but you can specify a different file using the `-c` cli \nswitch.\n\nThe config file contains multiple backup configurations. It looks something like this\n\n```toml\n[projects]\ndescription = 'All dev projects'\nsource = '/home/user/projects'\ntarget = '/mnt/backup'\nexcludes = [\n  '__pycache__/',\n]\n```\n\nSee [`rsbackup.toml`](./rsbackup.toml) for a documented example.\n\nEach TOML `table` (i.e. each section header) defines a single backup configuration. The header contains\nthe config's name. This is used as a command line argument to create a backup so pick something that needs no\nshell escaping.\n\nEach table contains the following keys:\n\nKey | Type | Optional | Description\n-- | -- | -- | --\n`description` | string | yes | contains an optional description.\n`sources` | array of string | no | lists the source directories to create a backup of\n`target` | string | no | contains a target directory which will eventualy contain multiple backups\n`excludes` | array of strings | yes | lists patterns to be excluded from the backup. See the `rsync` documentation for a description of the pattern format.\n\nYou can use\n\n```shell\nrsbackup list\n```\n\nto get a list of all backup configurations.\n\nTo create a backup, run\n\n```shell\nrsbackup create \u003cname of the config\u003e\n```\n\nThis will create a new directory named after the timestamp (in seconds) inside the target to contain the\nbackup. \n\nIf you run `rsbackup create` with the testconfiguration provided in [`rsbackup.toml`](./rsbackup.toml) you\nwill get the following backup under `tmp`:\n\n```\ntmp\n├── 2022-05-19_15-08-25\n│   └── rsbackup\n│       ├── config.py\n│       ├── config_test.py\n│       ├── __init__.py\n│       ├── __main__.py\n│       ├── rsbackup_test.py\n│       ├── rsync.py\n│       └── rsync_test.py\n└── _latest -\u003e /home/alex/Development/python/backup/tmp/2022-05-19_15-08-25\n```\n\nOf course, the name of the backup directory will depend on the local time you execute the backup. Notice that\nno `__pycache__` directory is contained in the backup as it is excluded. \n\n`rsbackup` provides the following command line options\n\nOption | Default Value | Description\n-- | -- | --\n`-h`, `--help` | - | display a help message\n`-c CONFIG_FILE`, `--config-file CONFIG_FILE` | `$HOME/.config/rsbackup.yaml` | path of the config file\n`-m`, `--dry-run` | - |  enable dry run; do not touch any files but output commands instead\n`--no-link-latest` | - | skip linking unchanged files to latest copy (if exists)\n\n# Development\n\nYou need Python \u003e= 3.9 to run and thus develop. `tomli` is used to load TOML files. `pytest` is used to \nexecute unit and acceptance tests. `setuptools` is used as a [PEP517](https://peps.python.org/pep-0517/)\nbuild backend. \n\n`requirements.txt` only contains the minimal set of dependencies to install the application, so it only \ncontains `tomli`.\n\n# License\n\nCopyright 2022, 2023 Alexander Metzner.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalimath%2Frsbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalimath%2Frsbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalimath%2Frsbackup/lists"}