nomercy/backup

This package backs up database tables.

1.0.2 2020-11-19 09:14 UTC

This package is auto-updated.

Last update: 2024-05-29 05:02:05 UTC


README

Version

This package backs-up and restores the database.

Backups are stored in the configured storage folder as: backup/database/YYYYMMDD/table_name.json

Install

composer require nomercy/backup

Run one of these commands.

php artisan nomercy:backup --backup # backs up tables set in the config/backup.php
php artisan nomercy:backup --backup --all # backs up all tables.
php artisan nomercy:backup --restore # restores all non existing records.
php artisan nomercy:backup --restore --force # deletes the records before inserting.

.env configuration.

Set the `BACKUP_TABLESto 'all' sets the --all parameter by default, defaults to config.tables<br> Set theBACKUP_DISKto choose a storage config path, defaults to local.<br> Set theBACKUP_LIMIT` to limit or increase the max stored backups, defaults to 14.

Author

👤 Stoney_Eagle