backup.sh and restore.sh are the original Vertica-supplied bash scripts.
/opt/verticadirectory (google can help with this). Then copy the file to a safe place. The script I use (which I'm reluctant to share just in case my testing is lax...I don't want to be responsible for your data loss) does something like this:
tar -czvf /tmp/vertica.tgz /opt/vertica
More on vbr.py
There are lots of nifty features in vbr.py other than simple node backups and restores. For instance, besides full backups we can also take incremental and snapshot backups, as well as backups of specific schemas and tables (helpful if you do multi-tenancy in Vertica). You can also use vbr.py to copy a database to another cluster (a non-prod staging cluster for example). Let's look at some of these.
This launches a pseudo-wizard that generates a configuration file for subsequent backup/restore tasks. The benefit of taking backups this way is that the restore occurs using the same configuration file. This makes it harder to screw things up.
This will provide you with the following options...
...but it will not actually take a backup. Rather it saves the backup configuration to the ini file. Let's take a look at that. Note that all of the options I chose are saved. Note that I am backing up to any other Linux-based host (or really any host that can support ssh, rcopy, and scp). When I actually run the backup I must ensure that the path exists on the remote backup host, in this case
We can now run the backup using the config file:
vbr.py --task backup --config-file MyBackup.ini
As mentioned earlier this is essentially copying all of the relevant data from your data and catalog directories.
Here you'll note that Vertica wants you to verify that you really trust this remote backup host.
Again, all vbr.py is doing is copying all files and directories under data and catalog to your backup location under the MyBackup folder which corresponds to the .ini file you used for your backup:
You can have many different configuration files for different backup purposes, but hopefully you get the general idea.
You can restore using your config file as well. To restore a full db:
To copy a database to another cluster
vbr.py --task copycluster --config-file
This is essentially a backup/restore in one atomic operation. The data and catalog paths must be identical. In the configuration file you specify the mappings of nodes in the source/target clusters. The target cluster must be down.
So, this is just like a standard restore except you are mapping old node names to new node names.
You have just read "[[Vertica Backups]]" on davewentzel.com. If you found this useful please feel free to subscribe to the RSS feed.
Dave Wentzel CONTENT