Options

DB Restore fails: IOError: Errno 2 No such file or directory

Hi all,

I'm trying to restore a full backup on a single node vertica database on my dev enviroment. However, I get the below error message I guess it is trying to create some file but ot able to.
I have checked the user access and dbadmin user has the access to the specified folder.
The OS is RedHat 7.3 and Vertica: vertica-8.1.1-0.x86_64

Can anyone please help me on this topic?

2018-09-26 20:58:50 localhost vbr VBR log initialized.
2018-09-26 20:58:50 localhost vbr Command line: /opt/vertica/bin/vbr --task restore --config-file=/home/dbadmin/vbr/dev_snapshot.ini --archive=/home/dbadmin/backups/Snapshots/dev_snapshot_20180924_121053
2018-09-26 20:58:50 localhost vbr Getting cluster information.
2018-09-26 20:58:52 localhost vbr Getting information for database: myDBName.
2018-09-26 20:58:57 localhost vbr Launching rsync daemon on "myHost".
2018-09-26 20:58:57 localhost backup_python ['ssh', '-T', '-x', '-o', 'ServerAliveInterval=60', '-o', 'BatchMode=yes', '-o', 'ExitOnForwardFailure=yes', '-o', 'PasswordAuthentication=no', '-o', 'StrictHostKeyChecking=no', '-oNoHostAuthenticationForLocalhost=yes', 'myHost', '/opt/vertica/oss/python/bin/python -V || true']
2018-09-26 20:58:57 localhost backup_python ['ssh', '-T', '-x', '-o', 'ServerAliveInterval=60', '-o', 'BatchMode=yes', '-o', 'ExitOnForwardFailure=yes', '-o', 'PasswordAuthentication=no', '-o', 'StrictHostKeyChecking=no', '-oNoHostAuthenticationForLocalhost=yes', 'myHost', '/opt/vertica/oss/python/bin/python']
2018-09-26 20:58:58 localhost rsyncd_launcher Output from rsync launcher:
2018-09-26 20:58:58 localhost rsyncd_launcher Transfer Server process entry: pid 78273.
Acquiring remoteServer mutex.
Acquired remoteServer mutex.
ps aux | grep rsync | grep -v grep | grep daemon | grep port=50000
dbadmin 219607 0.0 0.0 108412 628 ? Ss Sep24 0:00 /opt/vertica/bin/rsync --daemon --config=/tmp/vbr_rsyncd/vbr_rsyncd.conf --port=50000
Rsync daemon is already running.
Released mutex.

2018-09-26 20:58:58 localhost vbr Checking node connectivity.
2018-09-26 20:58:59 localhost vbr All nodes reachable.
2018-09-26 20:58:59 localhost vbr Making temp directories.
2018-09-26 20:58:59 localhost vbr Locking nodes.
2018-09-26 20:58:59 localhost vbr Locked nodes.
2018-09-26 20:58:59 localhost backup_python ['ssh', '-T', '-x', '-o', 'ServerAliveInterval=60', '-o', 'BatchMode=yes', '-o', 'ExitOnForwardFailure=yes', '-o', 'PasswordAuthentication=no', '-o', 'StrictHostKeyChecking=no', '-oNoHostAuthenticationForLocalhost=yes', 'myHost', '/opt/vertica/oss/python/bin/python -V || true']
2018-09-26 20:59:00 localhost backup_python ['ssh', '-T', '-x', '-o', 'ServerAliveInterval=60', '-o', 'BatchMode=yes', '-o', 'ExitOnForwardFailure=yes', '-o', 'PasswordAuthentication=no', '-o', 'StrictHostKeyChecking=no', '-oNoHostAuthenticationForLocalhost=yes', 'myHost', '/opt/vertica/oss/python/bin/python']
2018-09-26 20:59:01 localhost location_locker Locked backup location: MappingBackupLocation(backup_host='myHost', backup_dir='/home/dbadmin/backups').
2018-09-26 20:59:02 localhost vbr Starting full restore of database myDBName.
2018-09-26 20:59:02 localhost vbr Participating nodes: v_myDBName_node0001.
2018-09-26 20:59:02 localhost vbr Reading backup manifests to find restore point.
2018-09-26 20:59:03 localhost vbr Restoring from restore point: dev_snapshot_/home/dbadmin/backups/Snapshots/dev_snapshot_20180924_121053
2018-09-26 20:59:04 localhost vbr Traceback (most recent call last):
File "/opt/vertica/bin/vbr", line 8971, in main
if vbr_task.run():
File "/opt/vertica/bin/vbr", line 4325, in run
return self._run()
File "/opt/vertica/bin/vbr", line 5619, in _run
with StorageUtil.open_local(tmp_info_file_path, 'r') as info_file_in:
File "/opt/vertica/bin/vbr", line 3653, in open_local
return open(filename, mode)
IOError: [Errno 2] No such file or directory: '/tmp/vbr/vbr_20180926_185856_LY0hvI/dev_snapshot.info'

Comments

  • Options
    Jim_KnicelyJim_Knicely - Select Field - Administrator

    In the vbr ini file there is a setting for tempDir. It defaults to /tmp/vbr.

    Try creating the directory /tmp/vbr manually if it does not exist.

  • Options

    I am also getting the same error, But the /tmp/vbr already exists , any other suggestion?

    [dbadmin@ip-10-100-4-5 vbr]$ cat /tmp/vbr/vbr_2019-04-11-140914.log
    2019-04-11 14:09:14 localhost vbr VBR log initialized.
    2019-04-11 14:09:14 localhost vbr Command line: /opt/vertica/bin/vbr -t restore -c /vertica/data/bi/s3bak.ini
    2019-04-11 14:09:14 localhost vbr Getting cluster information.
    2019-04-11 14:09:15 localhost vbr Getting information for database: bi.
    2019-04-11 14:09:16 localhost vbr Checking node connectivity.
    2019-04-11 14:09:17 localhost vbr All nodes reachable.
    2019-04-11 14:09:17 localhost vbr Making temp directories.
    2019-04-11 14:09:17 localhost vbr Locking nodes.
    2019-04-11 14:09:17 localhost vbr Locked nodes.
    2019-04-11 14:09:17 localhost vbr Starting full restore of database bi.
    2019-04-11 14:09:17 localhost vbr Participating nodes: v_bi_node0004, v_bi_node0005, v_bi_node0006.
    2019-04-11 14:09:17 localhost vbr Reading backup manifests to find restore point.
    2019-04-11 14:09:18 localhost vbr Restoring from restore point: backup_snapshot_20190411_073008
    2019-04-11 14:09:18 localhost vbr Traceback (most recent call last):
    File "/opt/vertica/bin/vbr", line 8971, in main
    if vbr_task.run():
    File "/opt/vertica/bin/vbr", line 4325, in run
    return self._run()
    File "/opt/vertica/bin/vbr", line 5619, in _run
    with StorageUtil.open_local(tmp_info_file_path, 'r') as info_file_in:
    File "/opt/vertica/bin/vbr", line 3653, in open_local
    return open(filename, mode)
    IOError: [Errno 2] No such file or directory: '/tmp/vbr/vbr_20190411_140916_BJFZZR/backup_snapshot.info'

    The only thing i noticed is that my prod vertica is v_bi_node0001,v_bi_node0002,v_bi_node0003
    but my dev server where i am copying the backup has node names as v_bi_node0004,v_bi_node0005,v_bi_node0006

    could this be an issue.

  • Options

    I solved this issue, Its because my prod cluster had the node names as v_bi_node0001,v_bi_node0002,v_bi_node0003 and my dev cluster had the name v_bi_node0004,v_bi_node0005,v_bi_node0006
    I re-created my cluster such that it is similar to my prod cluster and i then i was able to restore it.

  • Options
    Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited April 2019

    To restore a full database backup, you must verify that the cluster to which you are restoring the backup has:

    1. The same number of hosts as the one used to create the backup
    2. The same architecture (Enterprise Mode or Eon Mode) as the one used to create the backup
    3. Identical node names
    4. The target database must already exist on the cluster to which you are restoring data.

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

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file