PHPackages                             routerboard-backup/routerboard-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. routerboard-backup/routerboard-backup

ActiveProject[Utility &amp; Helpers](/categories/utility)

routerboard-backup/routerboard-backup
=====================================

Ultimate backup tool for Mikrotik Routerboard

1.0.6(1y ago)481514[6 issues](https://github.com/heximcz/routerboard-backup/issues)MITPHPPHP &gt;=7.4.0

Since Feb 5Pushed 1y ago10 watchersCompare

[ Source](https://github.com/heximcz/routerboard-backup)[ Packagist](https://packagist.org/packages/routerboard-backup/routerboard-backup)[ RSS](/packages/routerboard-backup-routerboard-backup/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (11)Versions (22)Used By (0)

Mikrotik Routerboard Backup
===========================

[](#mikrotik-routerboard-backup)

[![Latest Stable Version](https://camo.githubusercontent.com/dd81ddfcb60f96f814f228c4ce9309ebbe5ca3f9bb360ef09319fea2ce7693f8/68747470733a2f2f706f7365722e707567782e6f72672f726f75746572626f6172642d6261636b75702f726f75746572626f6172642d6261636b75702f762f737461626c65)](https://github.com/heximcz/routerboard-backup/releases)[![Latest Unstable Version](https://camo.githubusercontent.com/79afc8028c7b40b83017d1f018201e277c6280681a9f3a67ebe7f402b3203edd/68747470733a2f2f706f7365722e707567782e6f72672f726f75746572626f6172642d6261636b75702f726f75746572626f6172642d6261636b75702f762f756e737461626c65)](https://github.com/heximcz/routerboard-backup)[![License](https://camo.githubusercontent.com/08762dc3ffc1ac0378e93bab9e096dcc75b0129f99ce866b25aeca55db1d1c1c/68747470733a2f2f706f7365722e707567782e6f72672f726f75746572626f6172642d6261636b75702f726f75746572626f6172642d6261636b75702f6c6963656e7365)](https://github.com/heximcz/routerboard-backup/blob/master/LICENSE.md)

Changelog
---------

[](#changelog)

Read [changelog](https://github.com/heximcz/routerboard-backup/blob/master/CHANGELOG.md) for news.

Overview
--------

[](#overview)

Ultimate backup of your mikrotik routerboard configurations. Backup to **local hard drive** or backup to **GitLab repository**.

Prerequisites
-------------

[](#prerequisites)

PHP &gt;= 7.4 **( from v1.0.3 )**

Warning
-------

[](#warning)

Private Token support will be removed in GitLab 10.2, from this version please use [Personal Access Tokens](https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html)

Features
--------

[](#features)

- support for gitlab base64 file decode\*\* (from 1.0.1)
- Full support Gitlab API V4 (from 1.0.0)
- Support for override default SSH port in the config file. (from v0.9.0)
- Backup to GitLab repository. (from v0.8.0)
- Auto generate RSA key if it does not exist.
- Create a new account for backup on a routerboard with a public key.
- Get routerboard identity and save IP address along with this one to database.
- When backing up the routerboard, delete the old backup to create new ones. Only the current backup will remain on the routerboard; it will not fill the disk with the old backup.
- Create standard .backup and .rsc backup files in the form of a script.
- Your backups are stored on a local disk to the directories; each have in their name an identity and IP address of the backed-up device.
- Your backups on the local disk are automatically replaced with the current backup. Only the last five backups remain. You will never have a full disk, even after many years to come.
- If an error occurs while backing up, an email will be sent automatically.

Recommended
-----------

[](#recommended)

- Do not forget set up "sendmail\_path" value in php.ini ;-)
- for example `sendmail_path = "/usr/sbin/sendmail -t -i -f no-reply@your-domain.com"`

How to install
--------------

[](#how-to-install)

- Connet via SSH to your web server

```
$ cd /opt/
$ git clone https://github.com/heximcz/routerboard-backup.git
$ cd /opt/routerboard-backup/
$ git tag -l
$ git checkout tags/
$ cp ./config.default.yml ./config.yml
$ mkdir -p /var/log/routerboard-backup/
```

- **!! Do not forget to configure the config.yml !!**

Create database
---------------

[](#create-database)

```
CREATE TABLE IF NOT EXISTS `routers` (
  `id` int(11) NOT NULL,
  `addr` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'IP address',
  `port` smallint(5) UNSIGNED DEFAULT NULL,
  `identity` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT 'System identity',
  `created` datetime NOT NULL,
  `modify` datetime DEFAULT NULL,
  `lastbackup` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

ALTER TABLE `routers`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `routers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
```

How to update Routerboard Backup
--------------------------------

[](#how-to-update-routerboard-backup)

```
$ cd /opt/routerboard-backup/
$ git pull
$ git tag -l
$ git checkout tags/
```

- How simply find out how to check the tag

```
$ git describe --tags
```

Example Usage
-------------

[](#example-usage)

print help:

`php ./routerboard-backup.php`

`php ./routerboard-backup.php rb:mod -h`

`php ./routerboard-backup.php rb:backup -h`

`php ./routerboard-backup.php rb:list -h`

`php ./routerboard-backup.php rb:gitlab -h`

`php ./routerboard-backup.php rb:decode -h`

Using via crontab
-----------------

[](#using-via-crontab)

add this line to your /etc/crontab: (backup of all in database one per week to local hard drive)

`nano /etc/crontab`

`0 0  * * 6   root /usr/bin/php /opt/routerboard-backup/routerboard-backup.php rb:backup >> /var/log/routerboard-backup/routerboard-backup.log`

add this line to your /etc/crontab: (backup of all in database one per week to GitLab repository)

`0 0  * * 6   root /usr/bin/php /opt/routerboard-backup/routerboard-backup.php rb:gitlab >> /var/log/routerboard-backup/routerboard-backup.log`

Logrotate script
----------------

[](#logrotate-script)

`nano /etc/logrotate.d/routerboard-backup`

```
/var/log/routerboard-backup/*.log
{
	rotate 5
	monthly
	compress
	missingok
	notifempty
}
```

Donate
------

[](#donate)

If this repo helped you set donating to the author of the program.

```
Bitcoin: 17MPKzx9jxssa5z83FBPmpfLYTpAcEEfLV

```

YouTube video: How to
---------------------

[](#youtube-video-how-to)

[![Routerboard Backup Video How To](https://camo.githubusercontent.com/c277175806fd83dfc71893982488c34efa9633b0119ff57f524eb6cb192ce1e9/687474703a2f2f696d672e796f75747562652e636f6d2f76692f2d624f75702d663345656f2f302e6a7067)](https://www.youtube.com/watch?v=-bOup-f3Eeo)

Product site
------------

[](#product-site)

License
-------

[](#license)

[MIT](https://github.com/heximcz/routerboard-backup/blob/master/LICENSE.md)

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 89.5% 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 ~163 days

Recently: every ~622 days

Total

21

Last Release

527d ago

Major Versions

0.9.5 → 1.0.02017-09-07

PHP version history (2 changes)1.0.3PHP ^7.1.3

1.0.4PHP &gt;=7.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5465593?v=4)[heximcz](/maintainers/heximcz)[@heximcz](https://github.com/heximcz)

---

Top Contributors

[![heximcz](https://avatars.githubusercontent.com/u/5465593?v=4)](https://github.com/heximcz "heximcz (229 commits)")[![besthostingcz](https://avatars.githubusercontent.com/u/14559709?v=4)](https://github.com/besthostingcz "besthostingcz (26 commits)")[![al-shark](https://avatars.githubusercontent.com/u/22329602?v=4)](https://github.com/al-shark "al-shark (1 commits)")

---

Tags

configbackupmikrotikrouterboardrsc

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M526](/packages/shopware-core)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k56](/packages/open-dxp-opendxp)

PHPackages © 2026

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