ybrestore Options

This section contains detailed descriptions of the ybrestore options. Many of these options work the same for ybbackup and ybbackup-list. See ybbackup Options.

--alias
Restore a database under a new name. If you are restoring multiple databases in one command, list the database names and the alias names in the same order in their respective lists. Aliases are useful when you want to restore a database that already exists; the new and existing databases can co-exist with different names on the same appliance. Aliases are also useful as a means of renaming databases when you restore them. The --alias option cannot be used with --all.
-a, --all
Note: This option is deprecated in Version 2.0. Yellowbrick Data recommends that you use the --objects option instead.
Restore all databases on the Yellowbrick appliance. You must specify this option, -d option, or the --objects option. The --objects option is recommended. --all option cannot be used with --alias.
--cacert STRING
Customize trust with secured communication; use this option in combination with the --secured option. Enter the file name of a custom PEM-encoded certificate or the file name and password for a Java KeyStore (JKS).
For PEM format, the file must be named with a .pem, .cert, .cer, .crt, or .key extension. For example:
--cacert cacert.pem
For JKS format, files are always password-protected. Use the following format:
--cacert yellowbrick.jks:changeit

where the : character separates the file name from the password of the keystore.

See also Enabling SSL/TLS Encryption.

-d, --databases
Note: This option is deprecated in Version 2.0. Use the --objects option instead.
Name one or more databases to restore. You must specify this option or the -a option. Specify a list as shown in the following examples, with or without commas. Spaces after commas are optional:
-d premdb, yellowbrick, newone
--databases premdb yellowbrick newone
Alternatively, you can specify -d or --databases more than once in the same command. For example:
-d premdb -d yellowbrick
--dirs
Storage location for the backup files. See also ybbackup-list Command. You must specify one path to one directory. Multiple directory locations are not supported. Relative paths are allowed. For example:
--dirs /home/brumsby/backups
--disable-trust, -k
Disable SSL/TLS trust when using secured communications. Trust is enabled by default. See also Enabling SSL/TLS Encryption.
Important: This option is not supported for use on production systems and is only recommended for testing purposes. It may be useful to disable trust during testing, then enable it when a formal signed certificate is installed on the appliance.
--dryrun
Do a dry run of the restore to check that your configuration options are valid; do not actually run the restore operation.
-?, --help
Return help text for all of the ybrestore options.
-h, --host
The database server host. Alternatively, you can set this value with the YBHOST environment variable. Defaults to localhost.
--java-version
Return the Java version that is running on the client system. The client tools require the 64-bit version of Java 8 (also known as Java 1.8). Java 9 and 10 are not supported.
-l, --latest
Specify the restore point as the most recent backup in the chain. If you specify this option, do not specify -w. Before using this option, make sure the latest backup is appropriate for the restore operation you want to run. For example, if the latest backup in the chain is a "no data" backup but you want to restore the complete database, you will have to choose an earlier restore point.
--large-tables-first [ true | false ]
Restore the largest tables first. By default, smaller tables are restored first.
--log-level OFF | ERROR | WARN | INFO | DEBUG | TRACE
Specify the logging level for the default console output. The default level is INFO. (Use the --logfile-log-level option to specify the logging level for a named log file.)
--logfile STRING
Specify the name and location of a log file for the restore operation. If the specified file already exists, it will be truncated. If this option is not specified, no log file is written. When you specify this --logfile option, also specify a --logfile-log-level value other than OFF.
--logfile-log-level OFF | ERROR | WARN | INFO | DEBUG | TRACE
Specify the logging level for a given log file (as defined with the --logfile option). If the level is not specified, it defaults to the --log-level value. You must specify a --logfile-log-level value other than OFF when you specify the --logfile option.
--name
Name of a backup chain to restore from. See ybbackup Options for information about backup chains.
--nodata
Restore from a backup that contains metadata but no data (the result of a backup that was run with the --nodata option). To restore a metadata-only backup, you must specify this option in the restore command, and the restore point you specify must align with a backup that was taken with the --nodata option.
-o, --objects
Specify one or more databases that you want to restore. For example:
--objects newpremdb
--objects premdb, yellowbrick
-W, --password
Interactively prompt for the database user's password. Do not enter a password on the command line if you use this option. For non-interactive password entry, set the YBPASSWORD environment variable.
-p, --port
The database server port. Alternatively, set this value with the YBPORT environment variable. Default: 5432
-q, --quiet
Do not write any output to the screen. This option is suitable for cron invocations. If this option is specified, you must also specify --logfile.
--secured, --no-secured
Use SSL/TLS to secure all communications. The default is not secured. See also Enabling SSL/TLS Encryption.
-U, --username
Database user running the restore. Alternatively, set this value with the YBUSER environment variable.
--version
Return the software version for the backup tools.
-w, --which
Specify the restore point, either as an ordinal number or as a timestamp. Use the ybbackup-list Command to see the available restore points in a given backup chain. If you specify the -w option, do not specify the --latest option. These options are mutually exclusive. If you use a timestamp with the -w option, you must enter it exactly as shown in the output of the ybbackup-list command.