PHPackages                             sapistudio/backup - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. sapistudio/backup

ActiveLibrary[File &amp; Storage](/categories/file-storage)

sapistudio/backup
=================

A package to backup your files

2.0.5(5y ago)09MITPHPPHP ^5.5|^7.0

Since Oct 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Sapistudio/Backup)[ Packagist](https://packagist.org/packages/sapistudio/backup)[ RSS](/packages/sapistudio-backup/feed)WikiDiscussions main Synced 3w ago

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

Fork &amp; adaptation after
===========================

[](#fork--adaptation-after)

()

Init
====

[](#init)

```
use SapiStudio\Backup\Handler;

$bkHandler = Handler::create('/tmp/backups');// set up your backup folder location
$bkHandler->setMaxFileSize(5)//maximum filesize in Mb to be added to backup,skip it will add all files
->setAllowedExtensions(['php'])//desired extensions to backup,skip it will add all files
->includeFilesFrom(['/'])//the main directories to backup,as array . full path required
->excludeFilesFrom(['/','/images/'])//directories to ignore on backup,as array. full path required
;
```

Create backup
=============

[](#create-backup)

```
$bkHandler->createBackup();// only runs from cli
```

list backups
============

[](#list-backups)

```
$bkHandler->listBackups();
```

cleanup backups
===============

[](#cleanup-backups)

```
// this is the default config,you do not have to passed it if you dont change it
$cleanupConfig = [
        'numberOfBackupsPerPeriod'      => 0,/** The number of backups must be kept on period. */
        'keepDailyBackupsForDays'       => 16,/** The number of days for which all daily backups must be kept.*/
        'keepWeeklyBackupsForWeeks'     => 8,/** The number of weeks for which all one weekly backup must be kept.*/
        'keepMonthlyBackupsForMonths'   => 4,/** The number of months for which one monthly backup must be kept.*/
        'deleteOldestBackupsWhenUsingMoreMegabytesThan' => 5000,/** After cleaning up backups, remove the oldest backup until this number of megabytes has been reached.*/
];
$bkHandler->cleanupBackups($cleanupConfig);// only runs from cli
```

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

2

Last Release

2075d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ed1a8aae5d1befdaadd91bd113d227ec995b0382d2cf5fc827d479b510454fad?d=identicon)[maharbig](/maintainers/maharbig)

---

Top Contributors

[![Sapistudio](https://avatars.githubusercontent.com/u/15252797?v=4)](https://github.com/Sapistudio "Sapistudio (28 commits)")

### Embed Badge

![Health badge](/badges/sapistudio-backup/health.svg)

```
[![Health](https://phpackages.com/badges/sapistudio-backup/health.svg)](https://phpackages.com/packages/sapistudio-backup)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[spatie/laravel-backup

A Laravel package to backup your application

6.0k24.4M243](/packages/spatie-laravel-backup)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[illuminate/session

The Illuminate Session package.

9939.3M849](/packages/illuminate-session)[illuminate/filesystem

The Illuminate Filesystem package.

16165.0M3.2k](/packages/illuminate-filesystem)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4925.3k](/packages/erag-laravel-lang-sync-inertia)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
