Download the PHP package tuscanicz/php-aws-snapshots without Composer

On this page you can find all versions of the php package tuscanicz/php-aws-snapshots. 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 php-aws-snapshots

Create automatic AWS EC2 snapshots with limits on the total number of snapshots created and the interval which the snapshots are created.

For example, you could create a snapshot every day and only keep the last 7 for a running week's worth of snapshots. Or create a snapshot once a week and only keep the last 4 so you would have a running month's worth of snapshots.

Requirements

AWS CLI installation

Setup

This assumes you've already installed and configured AWS CLI and added the correct IAM permissions within your AWS console.

1. Create a PHP script to use the library

Use composer to autoload all the necessary classes.

Setup AWS CLI installation directory (using the value from which aws) and configure your volumes.

Finally wire the services and test run your cli task. You can also change a description prefix that is used by this library to pick snapshots from the server. This is done via the second argument of Snapshots::run()

Example wiring in Symfony services.yml:

Volume Configuration

There are two types of volume configurations.

Both of them maintain a certain number of snapshots (snapshot count limit) of a volume with specified description. The description is used by this library to select snapshots. When you create a manual snapshot of a same volume, it will be ignored.

Interval Backups

You can schedule only one backup within a specified interval by using:

where the arguments are:

Name Type Description
volume id string AWS EBS volume ID
snapshot count limit integer total number of snapshots to store for a volume
interval string how often to create snapshot (30 minute, 1 day, 7 day, 2 week - full list below)
description string snapshot description that shows in the Snapshot section within AWS console and is used to filter manual backups
Regular Backups

You can also backup a volume every time you run the PHP task by using:

where the arguments are:

Name Type Description
volume id string AWS EBS volume ID
snapshot count limit integer total number of snapshots to store for a volume
description string snapshot description that shows in the Snapshot section within AWS console and is used to filter manual backups

Interval Values

The interval format is number type (e.g. 30 minute):

2. Add a cron job

The cron job schedule will depend on your configuration. You should run the cron command in a period that is as long as the smallest interval of your volume backups.

In the example you have to run the CRON task at least once a day. It will create snapshot of:

Example IAM Policy

This is a minimal policy that includes ONLY the permissions needed to work. You could also limit the "Resources" option to restrict it even further.

Questions, issues or suggestions

Please use the issues section for any questions or issues you have. Also, suggestions, pull request or any help is most welcome!


All versions of php-aws-snapshots with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
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 tuscanicz/php-aws-snapshots contains the following files

Loading the files please wait ....