Backup Solutions (Recipes)
SnapShooter has a concept of a backup solution (previously called recipes) when creating a backup job you can select from the list of premade solutions, ranging from file backups to MySQL databases. Each solution offers a standardized way to configure and run a backup.
(This is why we are able to add new backups easily for customers)
Each solution will have the following key data: requirements, platform, config.
Requirements:
A list of Linux commands that need to be installed on the server for the backup to function e.g. curl, mysqldump.
Platform:
Which compute platform does the backup run on. Customers own servers, or SnapShooters compute.
Config:
Each backup solution requires config to run, this could be a path for backups or a MySQL password. Each config variable is defined with a key, label, type, rules, a default and help text.
The rules you will note are validation rules based on Laravels request validation.
List Backup Solutions #
URL Parameters
This endpoint does not accept any parametersGET /v1/recipes
curl https://api.snapshooter.com/v1/recipes \ -X GET \ --header 'Authorization: Bearer API_TOKEN_HERE'
HTTP/2 200{ "data": [ { "slug": "mysql-single", "name": "MySQL (Single Databases)", "description": "Backup a single MySQL database to your external storage", "private": false, "requirements": [ "curl", "gzip", "mysqldump" ], "available_images": { "snapshooter/mysql-client": "snapshooter/mysql-client" }, "default_image": "snapshooter/mysql-client", "platform": { "own_server": true, "snapshooter": true }, "config": { "mysql_username": { "label": "MySQL Username", "type": "text", "rules": [ "required", "string" ], "default": null, "help": null }, "mysql_password": { "label": "MySQL Password", "type": "password", "rules": [ "required", "string" ], "default": null, "help": null }, "mysql_host": { "label": "MySQL Host", "type": "text", "rules": [ "required", "string" ], "default": "127.0.0.1", "help": null }, "mysql_port": { "label": "MySQL Port", "type": "Number", "rules": [ "required", "numeric", "min:1", "max:65535" ], "default": null, "help": null }, "mysql_database": { "label": "MySQL Database", "type": "text", "rules": [ "required", "string" ], "default": null, "help": null }, "mysql_flags": { "label": "MySQL Custom Flags", "type": "text", "rules": [ "string", "App\\Rules\\MySQLSingleDumpRule" ], "default": "--single-transaction --compress", "help": "Custom mysqldump flags if required" }, "compression_level": { "label": "Compression Level", "type": "number", "rules": [ "required", "numeric", "min:0", "max:9" ], "default": 6, "help": null } } } ], "links": { }, "meta": { }}
Thank you for helping us improve!