https://github.com/kpetremann/saltstack-borgbackup
Saltstack modules for BorgBackup (https://borgbackup.readthedocs.io/en/stable/)
https://github.com/kpetremann/saltstack-borgbackup
borgbackup saltstack
Last synced: about 2 months ago
JSON representation
Saltstack modules for BorgBackup (https://borgbackup.readthedocs.io/en/stable/)
- Host: GitHub
- URL: https://github.com/kpetremann/saltstack-borgbackup
- Owner: kpetremann
- License: mit
- Created: 2021-04-27T19:46:16.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-11-13T12:31:34.000Z (over 4 years ago)
- Last Synced: 2025-04-08T10:55:20.400Z (about 1 year ago)
- Topics: borgbackup, saltstack
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/psf/black)
[](https://opensource.org/licenses/MIT)
# Saltstack modules for BorgBackup
## Execution modules
#### latest
```python
latest(repository_path)
```
Get latest archive in repository.
**Arguments**:
- `repository_path`: path of BorgBackup repository
#### archives
```python
archives(repository_path)
```
List BorgBackup archives.
**Arguments**:
- `repository_path`: path of BorgBackup repository
#### info
```python
info(repository_path, archive="")
```
Get repository or archive information.
**Arguments**:
- `repository_path`: path of BorgBackup repository
- `archive`: name of archive
#### explore
```python
explore(repository_path, archive, inpath="")
```
List BorgBackup archive content.
**Arguments**:
- `repository_path`: path of BorgBackup repository
- `archive`: name of archive
- `inpath`: path of directory or file in the archive
#### extract
```python
extract(repository_path, archive, inpath, target, strip_components=0, test=False)
```
Extract file or directory from BorgBackup archive.
**Arguments**:
- `repository_path`: path of BorgBackup repository
- `archive`: name of archive
- `inpath`: path of directory or file in the archive to extract
- `target`: destination of the extract
- `strip_components`: remove the specified number of leading path elements
# State modules
#### restore\_file
```python
restore_file(name, repository_path, archive, target_dir=None)
```
Restore file from BorgBackup archive.
If target_dir is not defined, the backup will be restored in original place.
**Arguments**:
- `name`: path of item in the archive to restore
- `repository_path`: path of BorgBackup repository
- `archive`: name of archive
- `target_dir`: destination of the restoration, default is original path
#### restore\_directory
```python
restore_directory(name, repository_path, archive, target_dir=None, overwrite=False)
```
Restore from BorgBackup archive.
If target_dir is not defined, the backup will be restored in place.
**Arguments**:
- `name`: path of item in the archive to restore
- `repository_path`: path of BorgBackup repository
- `archive`: name of archive
- `target_dir`: destination of the restoration, default is original path
- `overwrite`: overwrite directory in target_dir