New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Ensign Ensign
Ensign
1764 views

(OBR) Support Tip: How to backup Vertica

1) Create Backup Location
mkdir /opt/DB/backup

2) Modify the backup folder with verticadba user
chown verticadba:verticadba /opt/DB/backup/

3) Setup Vertica backup file configuration

cd /home/verticadba/
[root@server ~]# su - verticadba -c "/opt/vertica/bin/vbr.py --setupconfig"
Snapshot name (backup_snapshot): fullbackup
Destination Vertica DB bin directory (only required for object replication) (/opt/vertica/bin):
Number of restore points (1):
Specify objects (no default):
Object restore mode (coexist, createOrReplace or create) (createOrReplace):
Vertica user name (verticadba):
Save password to avoid runtime prompt? (n) [y/n]: y
Database user password to save in vbr password config file (no default):
Node v_pmdb_node0001
Backup host name (no default): 127.0.0.1
Backup directory (no default): /opt/DB/backup
Change advanced settings? (n) [y/n]: n
Password file name (no default): passwdvertica
Saved vbr password to passwdvertica.
Config file name (fullbackup.ini):
Saved vbr config to fullbackup.ini.

[root@server ~]# ls -ltrh
total 8.0K
-rw------- 1 verticadba verticadba  33 Feb 26 07:41 passwdvertica
-rw-rw-r-- 1 verticadba verticadba 277 Feb 26 07:41 fullbackup.ini


[verticadba@server ~]$ cat /home/verticadba/fullbackup.ini
[Misc]
snapshotName = fullbackup
dest_verticaBinDir = /opt/vertica/bin
restorePointLimit = 1
objectRestoreMode = createOrReplace
passwordFile = passwdvertica

[Database]
dbName = pmdb
dbUser = verticadba

[Transmission]

[Mapping]
v_pmdb_node0001 = 127.0.0.1:/opt/DB/backup


4) Initiate backup point /opt/DB/backup
su - verticadba -c "/opt/vertica/bin/vbr.py --task init --config-file /home/verticadba/fullbackup.ini"
Initializing backup locations.
Backup locations initialized.

[verticadba@ult01obr175 ~]$ ls -ltrh /opt/DB/backup/
total 4.0K
-rw------- 1 verticadba verticadba 22 Feb 26 09:11 backup_manifest


5) Create Full backup
su - verticadba -c "/opt/vertica/bin/vbr.py --task backup --config-file /home/verticadba/fullbackup.ini"
Starting backup of database pmdb.
Participating nodes: v_pmdb_node0001.
Snapshotting database.
Snapshot complete.
Approximate bytes to copy: 260767110 of 260767110 total.
[==================================================] 100%
Copying backup metadata.
Finalizing backup.
Backup complete!


6) List backups done
su - verticadba -c "/opt/vertica/bin/vbr.py --task listbackup --config-file /home/verticadba/fullbackup.ini"
backup                       epoch    objects   hosts(nodes)                 file_system_type
fullbackup_20180226_153958   438913             v_pmdb_node0001(127.0.0.1)   [Linux]

Labels (3)
Tags (3)
6 Replies
Highlighted
Captain
Captain

Does this procedure work for Vertica cluster?

0 Likes
Highlighted
Vice Admiral Vice Admiral
Vice Admiral

Hi,

 

This procedure will work for Vertica in cluster as all nodes are in sync once DB is started.

 

Many Thanks..

Mithilesh

0 Likes
Highlighted
Captain
Captain

Hi Mithilesh,

i need to take backup of my vertica db, but i'm not able to see --setupconfig option for creating the .ini file, can you please suggest me here,

also my vertica is in cluster environment.

Vertica.JPG

0 Likes
Highlighted
Captain
Captain

Hi murillse,

i need to take backup of my vertica db, but i'm not able to see --setupconfig option for creating the .ini file, can you please suggest me here,

also my vertica is in cluster environment.

Vertica.JPG

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Hello Saurabh,

This blog information was provided over 2 years ago and it is unknown if murillse is around and monitoring this information.

I did look at the output of the vbr.py command and found that the --setupconfig option is listed within all versions of Vertica included with OBR 10.0x through OBR 10.40.

Vertica 9.1.1 is included with OBR 10.40 and when running the vbr.py command, it has the following information concerning --setupconfig.

--setupconfig      (deprecated)  step-by-step config setup

When I accessed a different server (not OBR) that had Vertica 9.2.x, I noticed that the --setupconfig option was no longer present.

What version of Vertica are you using?  If you are using OBR with Vertica 9.2.x, it may not be officially supported.  It was not provided with the OBR software.

If it was not provided with the OBR Software, then you will need to work with Vertica Support to help you further.

In either case, to back up Vertica 9.2.x you can reference the following Vertica 9.2.x documentation for backup and restore.  It includes sample VBR .ini files as templates, etc.

https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/AdministratorsGuide/BackupRestore/BackingUpAndRestoringTheDatabase.htm

I hope that this information is helpful.

Regards,

Mark

---
Mark Butler
Micro Focus SW Support Engineer
https://softwaresupport.softwaregrp.com/
0 Likes
Highlighted
Cadet 3rd Class Cadet 3rd Class
Cadet 3rd Class

Hi Saurabh,

 

I think you are not run the command properly.

You should run :

./vpr.py

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.