Created: 2012-08-28 18:22
Updated: 2019-02-13 12:25
License: bsd-3-clause

PHP Backuper {#mainpage}

This is a framework which will help you making (incremental) backups of your site, pack them to archive (every format that PHAR supports) and save it into remote or local locations, such as different cloud storages, FTP servers, e-mail, file sharing services, etc... Extremely useful for daily backup The framework is written in pure php an can be used on free hostings with supported PHP version ( 5.4+) and was designed as extensible. Feel free to fork and modify it.

Doxygen documentation


PHP 5.4+

SQLite + its PDO driver

dBug - - for debug output


MySQL + its PDO driver for MySQLBackuper

SabreDAV - - for WebDAVUploader

DropboxUploader - - for DropboxSimpleUploader

Modules folder structure

There is a folder, where we store the modules, somewhere in the server. Let's call it 'modules' for example. Then the subtree will be such:

   |            |    |
   |           ...  Backuper.php
   |         |     |
   |         ...  Dav___
   |               |   |
   |              ...  Client.php
   |                  |    |
   ...               ...  DropboxUploader.php

Backup main workflow

Look into example.php . To make backup you'll need:

  1. to create a Backuper instance
  2. to call makeBackup() method

Creating instance

	new Backuper(
				/*here should be a list of upload plugins (further uploaders)*/
				/*here should be a list of backup pluguns (further backupers)*/

Making backup

You need to call Backuper::makeBackup method.

Look example.php for details.


Backupers are responsible for extracting data, packing them to archive and mantaining index. Each backuper must implement IBackuper interface.


Uploaders are responsible for upload resulting archive to different services such as DropBox, SugarSync, Google Drive, Yandex.Disk, etc. Each uploader must implement IUploader interface.

Implemented modules (most of them ;)

  • WebDAVUploader - will help you with uploading to Yandex.Disk,, SkyDrive and other WebDAV services. Also you can use to access DropBox and to access most of cloud storages through WebDAV.
  • DropboxSimpleUploader - will help you with uploading to DropBox using login and password.
  • FileTreeBackuper - makes incremental backup of file tree. Supports ignores. Every ignore is a regex in FileTreeBackuper_ignores.
  • MySQLBackuper - makes backup of SQL database (structure + data), but there can be problems. Also, you can possible to use it to backup bases other than MySQL, which are MySQL compatible and have PDO interface.
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more