Backup MODX

MODX Widget

The Backup MODX extra is a tiny dashboard widget. Just place the widget into your dashboard and click the "Backup" button whenever you need a quick backup of your site. For example before upgrading your site (Upgrading works perfect with the extra UpgradeMODX). You can select either to backup your database, files or both. After the backup is finished you can download the files separately or combined as a tar-archive. Just click the "Remove Backup" button after your download is finished and the script will delete the backup folder. Ready for upgrade or anything else. Always delete the backups!

The extra will backup all files and folders inside the base-path and will also include the core-folder if placed outside the web-root.

The widget is tested on different hosting environments and it works for my needs. If you have any problems/errors while using this extra - please let me know. If you also know how to enhance the extra/code - please feel free to contribute on the GitHub Repository.

Many thanks to BobRay for creating the extra MyComponent - makes creating extras so comfortable!

While creating the extra i looked up some code by:
- Inspired by the backup script of Oliver Haase-Lobinger (http://de.modx.com/blog/2014/03/modx-revolution-updates-vereinfachen) i just added a basic UI to make the backup more comfortable.
- Looking up how to create and transport a widget inside a extra: UpgradeMODX - https://github.com/BobRay/UpgradeMODX


Downloador see it on Github


Properties

Name Default Description
groups Administrator group, or commma-separated list of groups, who will see the widget
tarAlias tar some server need an alias to tar archives. For example:

all-inkl.com: /bin/pktar (Thanks to Jens Wittmann)
excludes file/folder, or comma-separated list of files/folders who will be excluded of the backup. Using file-path from the root. Example: /html/assets,/html/manager
targetPath {assets_path} Target directory of the backup files. No trailing slash! You can use {assets_path} as a placeholder for the assets folder. Example: {assets_path}folder
The folder "backup" will be created inside this directory to prevent deleting important directories by deleting the backup folder.