Download the PHP package srdante/laravel-singlestore-backup without Composer
On this page you can find all versions of the php package srdante/laravel-singlestore-backup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download srdante/laravel-singlestore-backup
More information about srdante/laravel-singlestore-backup
Files in srdante/laravel-singlestore-backup
Package laravel-singlestore-backup
Short Description A package that makes it easy to make backups of your SingleStore database.
License MIT
Informations about the package laravel-singlestore-backup
Laravel SingleStore Backup
Laravel SingleStore Backup is a package that makes it easy to make backups of your SingleStore database to your favorite storage. Behind the scenes, this package uses the BACKUP DATABASE
command, a native command from SingleStore DB engine.
Contents
- Installation
- Supported Drivers
- Configuring
- Basic Usage
- Setting Timeout Parameter
- Setting With Date Parameter
- Setting With Time Parameter
- Init Backup
- Differential Backup
- Prune Backups
- Prune Incremental Backups
- Prune Backups Older Than Days
- Prune Backups Older Than Date
- Advanced Usage
- Publishing Config File
- License
Installation
You can install the package via composer:
Supported Drivers
This package supports the following backup drivers:
- Local -
local
- S3 / S3 compatible -
s3
- Google Cloud Storage -
gcs
- Azure Blobs -
azure
Configuring
You must add the following lines to your .env file in order to configure your S3 credentials:
Basic Usage
Below there is a simple example of how you use the backup command. By default, the command will do a full backup.
Setting Timeout Parameter
You can set the timeout parameter, a value specified in milliseconds, to determines the length of time to wait for the BACKUP DATABASE
command to commit across the cluster. If not specified, the default_distributed_ddl_timeout
global variable value is used.
Setting With Date Parameter
If you want to add the date to the backup name, you can do that by using the --with-date
parameter.
Setting With Time Parameter
If you want to add the time to the backup name, you can do that by using the --with-time
parameter.
[!IMPORTANT] The
--with-date
and--with-time
parameters cannot be used in an incremental backup.
Init Backup
If you're making an incremental backup and want to create the INIT
backup, you can do that by using the --init
parameter.
Differential Backup
If you're making an incremental backup and want to do a DIFFERENTIAL
backup, you can do that by using the --differential
parameter.
Prune Backups
You can prune backups by using the singlestore:prune-backups
command. This command will prune the {$database}.backup
directory by default.
[!IMPORTANT] All pruning command can only be executed with the
s3
driver, and they follow the path specified in theSINGLESTORE_BACKUP_PATH
environment variable.
Prune Incremental Backups
If you want to prune incremental backups, you can do that by using the --incremental
parameter. This will prune the {$database}.incr_backup
directory.
Prune Backups Older Than Days
If you want to prune backups older than a certain number of days, you can do that by using the --older-than-days
parameter. This will prune the {$database}_(.*?).backup
(respecting the date) directory.
Prune Backups Older Than Date
If you want to prune backups older than a certain date, you can do that by using the --older-than-date
parameter. This will prune the {$database}_(.*?).backup
(respecting the date) directory.
[!IMPORTANT] Be careful when using the
--older-than-date
or--older-than-days
parameters. They will prune all directories matched with the{$database}_(.*?).backup
pattern + respecting the date specified. It may delete other unrelated directories if they match the pattern.
Advanced Usage
Sometimes the simple backup command with configs may not be flexible as you want. Instead, you can use the SinglestoreBackup
class:
Available arguments:
driver
database
path
endpoint
timeout
publicKey
secretKey
bucket
init
differential
region
multipartChunkSizeMb
s3ForcePathStyle
compatibilityMode
withDate
withTime
Publishing Config File
You can publish the package configuration file to your project with the following command:
License
Laravel SingleStore Backup is open-sourced software licensed under the MIT license.
All versions of laravel-singlestore-backup with dependencies
illuminate/console Version ^9.0|^10.0|^11.0
illuminate/database Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0