nkt / backup-bundle
Symfony bundle for backup your database data
Installs: 99
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 1
Open Issues: 0
Type:symfony-bundle
pkg:composer/nkt/backup-bundle
Requires
- php: ~5.3
- doctrine/orm: ~2.3
- symfony/symfony: ~2.3
This package is auto-updated.
Last update: 2025-10-04 15:20:55 UTC
README
Usage
Add "nkt/backup-bundle": "1.0.x-dev" into composer.json.
Add Nkt\BackupBundle\NktBackupBundle into your kernel bundles.
Now you can add new cron job, for backup your application:
0 */6 * * * /path/to/app/console doctrine:database:backup --gzip=-9
You can also restore any backup using
/path/to/app/console doctrine:database:restore /path/to/app/backup/backupname.sql.gz
Backup options
Backup filename contains driver name, database name and date.
You can change date pattern (by default Y-m-d-H-i-s)
using --date-pattern option.
If you using multiply connections, specify it using --connection option
or -c flag.
By default all backups saves into path/to/app/backups, you can change it
using --destination option or -d flag.
As you can see in example, you can compress backups using --gzip option.
This option required value, you have to specify compress quality.
Restore options
Restore command required filename by first argument. It also support
change connection with --connection option or -c flag.
You don't have to specify gzipped file. Command checks does filename
ends with .gz and decompress it.
License
MIT