Rah backup - Takes backups from Textpattern CMS installations

Overview

rah_backup

Packagist | Twitter | Donate

Rah_backup keeps your important site safe from disastrous events. Rah_backup is an admin-side backup utility plugin for Textpattern CMS. Backs up both your files and databases with single click of button, and restores as easily. To support its features the plugin packs a clean, user-friendly interface that feels like it was part of Textpattern itself.

Install

Using Composer:

$ composer require rah/rah_backup:*

Requirements

Rah_backups’ minimum requirements:

  • Textpattern 4.5.0 or newer.
  • PHP 5.3.6 or newer.

Modules

Rah_backup has set of modules that extend the plugin’s functionality:

Preferences

Rah_backup offers number of preferences that can be used to configure the plugin. All settings can be found from Advanced Preferences, organized under Backups section. Preferences allow defining paths to used command line application and set up backed up directories among other things. Following settings will be present.

Path to a directory used to store backups

The path should point to an existing, empty directory that is both readable and writeable by PHP. The path will be relative to Textpattern’s installation directory (e.g. ./textpattern). A backup directory path might look something like this:

../../backups

Directories to backup (comma-separated)

Sets which directories are backed up and included in created TAR archives. Separate multiple paths with commas (,). As with backup directory, all paths are relative to the Textpattern installation directory. On a single site setup, following would back up the directory containing Textpattern (i.e. textpattern directory and index.php file):

../

Files excluded from backups (comma-separated)

Sets files that are excluded from the filesystem backup. This setting can be useful for keeping sensitive files secure incase a backup is lost or leaks due to compromised backup server or a cloud file hosting account. Values used in the setting are searched from backed up files’ paths. Any file that path contains any of the values, will be excluded from the backup. Multiple files can be separated with a comma (,).

On a single site installation the following rule would exclude Textpattern’s config.php from the backup:

config.php

Ignore database tables (comma-separated)

Sets database tables that will not be included in database backups. Separate multiple tables with commas (,). Note that since the tables are not included in backups, they won’t be restored, created or populated either with the backup when restoring. Ignored tables need to be managed otherwise, and re-created manually.

This setting can be used to exclude sensitive information or temporary data from a frequently taken backups. Following would exclude Textpattern’s user accounts table containing email address and password hashes and visitor logs from backups:

txp_users, txp_log

Number of backup files to keep

Sets the number of backup files to keep, accepting an integer equal or greater than 1. Files that go over limit are removed each a new set of backups is created. Set zero 0 for unlimited.

Restoring

The backups can be restored with any old archive utility and database import tool, either via some GUI utility or command line. The plugin itself doesn’t offer restoring trough it admin-side panel for security reasons. On a normal, well-setup server you shouldn’t be able to restore your site through public-facing HTTP process due to permissions, and even if you could, would you really want to protect that action with just your Textpattern login. Now, if you can wipe your files through HTTP initiated PHP, you should look into your filesystem permissions as there might be a misconfiguration.

The other issue is that the one writing would be the same one that is getting restored. If that restoring process fails, it’s over. The restoration should be done as a smart offsite migration where the backup is deployed, tested and brought back online.

Importing databases

The database dumps are like any other SQL dump and can be restored with any database import tool, including phpMyAdmin or the MySQL CLI:

$ cd /path/to/backups/directory
$ gzip -d database.sql.gz > database.sql
$ mysql -u username -p database < database.sql

The first line changes current working directory, the following uncompresses the gzipped file and last imports the uncompressed SQL file to the specified database using the specified MySQL user.

Restoring filesystem TAR tapes

The site’s files are backed up to a gzipped TAR archives. These archives can be extracted with any decent archive utility or from command line:

$ cd /path/to/backups/directory
$ tar -xzvf filestem.tar.gz

Changelog

Version 0.1.0 – 2014/04/01

You might also like...
Enables developers to modify Magento installations (configuration, data) based on the given environment using n98-magerun.

Enables developers to modify Magento installations (configuration, data) based on the given environment using n98-magerun.

Textpattern-installer - Textpattern plugin and theme installer for Composer

Textpattern Installer for Composer Package directory | Issues Install plugins and themes to Textpattern CMS with Composer. $ composer require rah/rah_

Your alter ego object. Takes the best of object and array worlds.

Supporting Opensource formapro\values is an MIT-licensed open source project with its ongoing development made possible entirely by the support of com

MassPlugCompiler - Textpattern CMS plugin compiler

mtxpc mtxpc compiles Textpattern CMS plugin sources into installer packages. Supports multi-file structure and a JSON manifest file. Install Using Com

Ied plugin composer - Inspired Plugin Composer: Create, publish and edit plugins from within Textpattern CMS.

ied_plugin_composer Create, publish and edit plugins from within Textpattern CMS. Creates a new page under the Extensions tab where you can edit and e

Etc cache - Cache plugin for Textpattern CMS

etc_cache Download | Packagist This Textpattern plugin provides an events-driven cache solution for Textpattern CMS. Textpattern is fast, but when you

Etc pagination - Pagination plugin for Textpattern CMS.

etc_pagination Download | Packagist This Textpattern plugin creates a paginated navigation bar on listings. It has a wide variety of attributes – so y

Smd imagery - A Textpattern CMS plugin for managing images in the Write panel.

smd_imagery Insert images into your Write panel. Very handy for people who run photoblog or image-heavy sites, or those who categorise images for incl

Zem contact reborn - An extensible HTML form mailer plugin for Textpattern CMS.

com_connect Contents Introduction Installing and upgrading Migrating from zem_contact_reborn Usage Tags com_connect tag com_connect_text tag com_conne

Comments
  • error during install

    error during install

    I've got some errors during install. Now, I'm not sure if the plugin has been fully (and properly) installed nor if it's properly working (didn't test it yet), although I can see both rah_backup and rah_autoload listed in the Plugins tab. After this failed installation, rah_backup was not activated. I know kids like me shouldn't be playing with this not-yet-stable tooIs in the toolshed, but I'm reporting just in case it helps.

    $ composer require rah/rah_backup
    Please provide a version constraint for the rah/rah_backup requirement: dev-master
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
      - Installing rah/rah_autoload (0.2.1)
        Downloading: 100%         
    
      - Installing rah/danpu (1.5.0)
        Downloading: 100%         
    
      - Installing rah/rah_backup (dev-master b310f36)
        Cloning b310f36c15696c1eb5eff11b5fee633262820e4e
    
    PHP Fatal error:  Class 'Rah_Danpu_Dump' not found in /xxxxxxxx/public/textpattern/lib/txplib_misc.php(1435) : eval()'d code on line 6
    
    Fatal error: Class 'Rah_Danpu_Dump' not found in /xxxxxxxx/public/textpattern/lib/txplib_misc.php(1435) : eval()'d code on line 6
    
    opened by maniqui 4
Owner
Jukka Svahn
Backend developer by trade, hobbyist designer and frontend fiddler, self-proclaimed home cook and baker
Jukka Svahn
Rah sitemap - XML sitemap generator for Textpattern CMS

rah_sitemap Packagist | Issues | Donate Sitemap plugin for Textpattern CMS. Generates Sitemaps.org XML sitemaps for your site, which help Google and o

Jukka Svahn 7 May 13, 2022
Rah memcached - Store parts of Textpattern CMS templates in Memcached

rah_memcached Packagist | Issues | Donate A plugin for Textpattern CMS that stores parts of your templates in Memcached, a distributed in-memory key-v

Jukka Svahn 2 Aug 12, 2022
Rah comment spam - Comment anti-spam plugin for Textpattern CMS

rah_comment_spam Packagist | Issues | Donate Rah_comment_spam provides customizable anti-spam tools for Textpattern CMS’ comment system. Set minimum a

Jukka Svahn 2 Apr 24, 2022
Rah comments - Paginated article comments list for Textpattern CMS

rah_comments Download | Packagist | Issues | Support forum | Donate Rah_comments lets you to paginate Textpattern CMS’ comment lists, splitting the lo

Jukka Svahn 1 Mar 23, 2015
Rah privileges - Configure Textpattern CMS' user-group privileges through Preferences panel

rah_privileges Packagist | Donate Configure admin-side user-group permissions from Textpattern CMS’ preferences panel. Install Using Composer: $ compo

Jukka Svahn 4 Apr 16, 2022
Rah cache - Cache Textpattern's dynamic pages as flat files

rah_cache Packagist | Issues Rah_cache is a simple, experimental full-page caching plugin for Textpattern CMS. It caches Texpattern’s dynamic pages as

Jukka Svahn 2 Apr 24, 2022
Textpattern-for-Panic-Coda - A Textpattern CMS mode for Panic Coda

Textpattern elements for Panic Coda 2 Handy elements for use with Panic Coda 2 on a Mac when authoring files for the Textpattern CMS. This repository

Phil Wareham 8 Jun 26, 2017
A htaccess boilerplate for all Magento Community installations. Features focus on speed, SEO and security.

magento-htaccess A htaccess boilerplate for all Magento Community installations. Features focus on speed, SEO and security. The file should be placed

Creare 114 Sep 18, 2022
Module for integrating Fastly CDN with Magento 2 installations

FASTLY CDN FOR MAGENTO2 DOCUMENTATION Thank you for using the "Fastly CDN module for Magento2" (Fastly_Cdn). This package contains everything you need

Fastly 113 Dec 26, 2022
Drall - a tool to that helps run drush commands on multi-site Drupal installations

Drall Drall is a tool to that helps run drush commands on multi-site Drupal installations. One command to drush them all. — Jigarius A big thanks and

Jigar Mehta 23 Nov 25, 2022