PHPackages                             olafnorge/borgphp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. olafnorge/borgphp

AbandonedArchivedLibrary

olafnorge/borgphp
=================

PHP command wrapper for borgbackup.

0.1.2(5y ago)32102MITPHPPHP &gt;=7.2

Since May 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/olafnorge/borgphp)[ Packagist](https://packagist.org/packages/olafnorge/borgphp)[ RSS](/packages/olafnorge-borgphp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/ad54c2d0fd2e8e303409a7587b0733001a88f81aa148dc7349b211cbb80c9be8/68747470733a2f2f706f7365722e707567782e6f72672f6f6c61666e6f7267652f626f72677068702f642f746f74616c2e737667)](https://packagist.org/packages/olafnorge/borgphp)[![Latest Stable Version](https://camo.githubusercontent.com/61f960cee7d71c55d62fe83dbc4a7cb5744b2316ea10eee6e1f4fadaf0cc6c3a/68747470733a2f2f706f7365722e707567782e6f72672f6f6c61666e6f7267652f626f72677068702f762f737461626c652e737667)](https://packagist.org/packages/olafnorge/borgphp)[![License](https://camo.githubusercontent.com/3adde632659f0425b24b125ec7bcf82703e6b748712ae237adb5cacf59ac9b7f/68747470733a2f2f706f7365722e707567782e6f72672f6f6c61666e6f7267652f626f72677068702f6c6963656e73652e737667)](https://packagist.org/packages/olafnorge/borgphp)

Library to execute arbitrary BorgBackup commands
================================================

[](#library-to-execute-arbitrary-borgbackup-commands)

[From Borg Documentation: What is BorgBackup?](https://borgbackup.readthedocs.io/en/stable/#what-is-borgbackup "What is BorgBackup?")

> BorgBackup (short: Borg) is a deduplicating backup program. Optionally, it supports compression and authenticated encryption.
>
> The main goal of Borg is to provide an efficient and secure way to backup data. The data deduplication technique used makes Borg suitable for daily backups since only changes are stored. The authenticated encryption technique makes it suitable for backups to not fully trusted targets.

This library makes use of the borg binary and executes arbitrary commands through the underlying [Symfony Process component](https://github.com/symfony/process). It's essential for the library to be able to execute the binary therefore it needs to be installed beforehand. The library itself does not check if the command is available before executing it and will fail with a ProcessFailedException bubbled up from the Symfony Process component.

Installation of BorgBackup (the binary itself)
----------------------------------------------

[](#installation-of-borgbackup-the-binary-itself)

Please refer to [the official documentation](https://borgbackup.readthedocs.io/en/stable/installation.html) of Borg to get an idea which installation method suites best for your OS.

Installation of the library
---------------------------

[](#installation-of-the-library)

```
composer require olafnorge/borgphp
```

Usage
-----

[](#usage)

The library directly passes through all command parameters and options to the underlying BorgBackup binary. It takes care of the proper position of the parameters and options and does some validation if they align with the expected format of BorgBackup. All you need to do is passing the parameters and options as array to the command you want to execute.

```
