Backups / Disaster Recovery

These FAQs briefly summarise key points regarding how to use Composr's backups system and recover a site from disaster.

For more information, check out these tutorials:
Question Why are backups necessary for my Composr website?
Answer Disasters like hard disk failures, data corruption, and unexpected errors can happen at any time. A good backup strategy helps you recover your website and its data in case of such events. Backups can also help you roll back to a previous state if needed, such as after a failed upgrade or accidental changes.
Question How do I create a backup of my Composr website?
Answer Composr offers a built-in backup addon accessible from Admin Zone > Tools > Backups. You can choose between full, incremental, and database-only backups.
  • Full backup: Backs up all files and folders within the Composr installation directory, including the database.
  • Incremental backup: Backs up only new or changed files since the last backup, resulting in smaller backup files.
  • Database backup only: Backs up only the database.

The addon allows scheduled backups or manual backup generation. It is recommended to download backups to a location outside your web server for better security.

Note: The Composr backup addon is limited by server-side PHP capabilities and might not always be reliable. Consider using alternative backup strategies offered by your web hosting control panel for increased reliability.
Question What alternative backup strategies are available?
Answer Many web hosting control panels include built-in backup features that operate at the system level, often offering higher reliability than web-based scripts. Ensure you back up both files and the database.

For database backups, you can use tools like phpMyAdmin, which allows you to export your database as a .sql file.
Question How do I restore my Composr website from a backup?
Answer Composr backups come as .tar or .tar.gz files. Extract the archive using an extraction program like 7-zip or your web hosting control panel.

To restore a full backup:
  • Upload the extracted files to your webserver, overwriting the existing files.
  • Run the included restore.php script in your browser. This script will restore the database from the restore_data.php file.

To restore incremental backups:
  • Restore the initial full backup.
  • Sequentially extract and overwrite files from each incremental backup over the restored full backup.
  • The last extracted restore_data.php will contain the latest database state. Run restore.php to restore the final database version.
Question My Composr installation seems corrupted. How can I repair it?
Answer Composr offers several tools and methods for repairing corrupted installations:
  • Integrity checker: The upgrader tool, accessible via http://yourbaseurl/upgrader.php, includes an integrity checker that identifies outdated or corrupted files.
  • MySQL table repair: The Admin Zone > Tools > Cleanup tools provides access to MySQL table repair functionalities. Alternatively, use phpMyAdmin or your web host's database management tools for more direct control.
  • Safe Mode: Access safe mode via the bookmarked link from the setup wizard or by adding "breadcrumbs" itemprop="breadcrumb">

    (Located in Backups / Disaster RecoveryBackups / Disaster Reco…)

    Question How can I reset a forgotten account password in Composr?
    Answer If you have access to phpMyAdmin:
    • Access the f_members table.
    • Find the row corresponding to the user whose password needs to be reset.
    • Edit the row, setting m_pass_hash_salted to the new password using MD5 encryption, clearing m_pass_salt, and setting m_password_compat_scheme to 'md5'.

    If you have FTP access:
    • Obtain your IP address.
    • Edit your _config.php file, setting $SITE_INFO['backdoor_ip'] to your IP address. This enables a temporary backdoor login for your IP address, bypassing security restrictions.
    • Remove the backdoor entry after logging in and resetting the password through standard means.
    Caution: Using the backdoor method is a security risk and should be done with extreme caution.
    Question How can I manually edit my Composr database?
    Answer phpMyAdmin is a widely used web-based tool for managing MySQL databases. It allows you to:
    • Browse tables: View and edit individual rows within database tables.
    • Run SQL queries: Execute SQL commands directly for specific tasks.
    • Repair corrupted tables: Access table repair functions.

    Refer to the "Manually editing your database with phpMyAdmin" tutorial for more detailed instructions.
    Question What should I do if an addon causes problems on my Composr website?
    Answer Composr's Safe Mode can help isolate addon-related problems.
    • Enable Safe Mode: Use the safe mode link or the config editor (http://yourbaseurl/config_editor.php) to enable Safe Mode.
    • Uninstall the problematic addon: Once in Safe Mode, navigate to the addon management section and uninstall the addon causing the issue.
    • Disable Safe Mode: After resolving the problem, disable Safe Mode through the config editor.
    Question What should I do if URL Schemes are not working properly?
    Answer If URL Schemes, which rely on web server rewrites, are not functioning correctly, you can disable them using the http://yourbaseurl/config_editor.php script. Enable the option "Whether to block the URL Scheme (mod_rewrite)" to override the main configuration setting.