Download the PHP package atomicsmash/backups without Composer

On this page you can find all versions of the php package atomicsmash/backups. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package backups

This plugin is for backing up a WordPress website to Amazon S3.

Plugin features

Functions

wp backups backup

This function syncs media, performs a DB backup and sync the database to S3.

Examples

wp backups backup
- backup media and database

wp backups backup --type=media
- This just syncs your media

wp backups backup --type=database
- Use this to dump the DB and sync with S3

wp backups development_sql_sync

Examples

wp backups development_sql_sync
- This checks the status of the remote development database

wp backups development_sql_sync --sync-direction=push
- This checks the status of the remote development database
- Then provides the option to overwrite the remote database with what is available locally

wp backups development_sql_sync --sync-direction=pull
- This checks the status of the remote development database
- Then provides the option to overwrite the local database with what is available on S3

Installation

1. Add the Wordpress plugin to your composer file by navigating to your project and running this inside a terminal:

Commit the changes to your local composer file.

2. Add your S3 credentials to your wp-config file.

And these constants to your wp-config file:

You can obtain these details by creating an IAM user. Here is our guide on how to setup an IAM Amazon user and get the access and secret key that you need.

If you know the name of the bucket you would like to sync with, you can hard this by adding:

Commit the changes to your config.

3. Activate 'Backups'

Now activate the plugin on whichever site you would like backup. This can be done via the admin interface, or by running:

If you want to backup a live website, chances are you will need to SSH into the server.

4. Test S3 connection:

To test the connection to S3 run:

If there is an issue, please check your credentials are being loaded and are correct.

5. If the check is successful, it's time to create a fresh bucket

bucket_name is usually the address of the site you are currently working on ('website.local'). For example:

Running the above command will ask the question: Create bucket? [y/n] - supply 'y' to continue.

This will then create a bucket called "mywebsite.co.uk.backup" and select it ready for use.

6. Perform a backup

To start the first backup manually,

7. Setup auto-deletion of SQL files

Depending on how often you backup your website, the SQL files will start to build up quickly. You can setup an S3 folder lifecycle to auto-delete files older than X number of days.

We usually usually retain backups for 30 days, so we would run:

8. Setting up auto-backup (cron job)

To get the backup command to run on a regular basis, you need to setup a cron job. Use something similar to this:

If you are using composer in your project then your WordPress core files might be inside a subfolder, please modify the path to reflect this. The cron job would look like this:

If you are using forge, then simply add to the server scheduling panel:

forge-schedule

Also, if you are using Capistrano, don't forget to add current to the

Troubleshooting

Are you receiving an error similar to PHP Fatal error: Uncaught Error: Class 'Aws\S3\S3Client' not found in /path/to/file

Make sure you are requiring your autoload.php generated by composer. We usually add this to the top of our wp-config file:

Upcoming featured

Changelog

= 0.1.2 =

= 0.1.1 =

= 0.1.0 =

= 0.0.5 =

= 0.0.4 =

= 0.0.3 =

= 0.0.2 =

= 0.0.1 =


All versions of backups with dependencies

PHP Build Version
Package Version
Requires aws/aws-sdk-php Version 3.24.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package atomicsmash/backups contains the following files

Loading the files please wait ....