If you have a configuration file named
phpbu.xml in your current working directory you can execute phpbu like this
phpbuphpbu 3.2.0 Runtime: PHP 7.0.2 Configuration: /home/user/phpbu.xml OK (1 backup, 0 checks, 0 encryption, 0 syncs, 0 cleanups)
If you want to use a custom name for your configuration file you have to use the
phpbu --configuration=MyConfig.xmlphpbu 3.2.0 Runtime: PHP 7.0.2 Configuration: /home/user/MyConfig.xml OK (1 backup, 0 checks, 0 encryption, 0 syncs, 0 cleanups)
Here is the list of available options for the command line runner.
phpbu --helpphpbu 3.2.0 Usage: phpbu [option] --bootstrap=<file> A "bootstrap" PHP file that is included before the backup. --configuration=<file> A phpbu xml config file. --colors Use colors in output. --debug Display debugging information during backup generation. --simulate Perform a trial run with no changes made. -h, --help Print this usage information. -v, --verbose Output more verbose information. -V, --version Output version information and exit.
A "bootstrap" PHP file that is included before executing the backup.
Path to the phpbu config file to use. See Chapter 2 for more details.
Use colors in output.
Display debugging information during backup generation.
Execute phpbu without actually executing any backup, check, encryption, sync or cleanup task. See the simulation section for details.
In order to check what actions phpbu would perform, phpbu supports a simulation mode where no backup is actually created and no sync and cleanup tasks are executed. In simulation mode, phpbu will show you, what it would have done, if it would not have been a simulation run. You will get detailed output, which enables you to track every action phpbu would have performed.
This is a great way to test if the correct backup commands will be executed and if all the right backups will be cleaned up.
If phpbu has to use any kind of credentials executing a binaries, like for example the
mysqldump command, this credentials will maybe displayed in the simulation output.
If you are extending phpbu, you can support simulation as well. You can find detailed information on this in Chapter 10.