We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


backup database A, restore database B — Vertica Forum

backup database A, restore database B

Hi, I want to ask you if the following scenario could work. I have a cluster of 3 nodes, I create database ONE and make a snapshot. Then I create database TWO on the same cluster, is it possible to make a restore into database TWO from the snapshot of database ONE? As far as I know the answer is no because restore operation requires same DB name (at least an empty db) as the snapshot source. In this case, is there a way to perform this operation? thanks, Pietro

Comments

  • Navin_CNavin_C Vertica Customer
    Hi Pietro, In your case, both the database reside on the same node. So it is not possible to restore the snapshot into a database with different name and you cannot keep the same name on the same cluster. I would suggest, if the database size is small, then export all objects from Database A and deploy those objects in Database B. Remember - at a time only one database can be up. After deploying the objects, export the data from Database A on a table level basis and then load those table into Database B. I know, this is a length process, but in case you don't find a solution , you can use this as a workaround. Hope this helps
  • Hi Navin, Thank you for the reply. How could I export data from A to B? Do you mean by creating files ? thanks, P.
  • Navin_CNavin_C Vertica Customer
    Yes, by creating flat files and loading them once all the exporting is done.
  • fine, very clear! thanks
  • >> So it is not possible to restore the snapshot into a database with
    different name and you cannot keep the same name on the same cluster.
    I'm not agree.
    With catalog editor it's possible to change a dbname:
    > set singleton Database name 'new name'
    In this case all directories will have an 'old name', while a dbname is changed.

    For example I changed name from "test" to "sandbox":
    How it's look now
    $ vsql -l
      List of databases
      name   | user_name 
    ---------+-----------
     sandbox | daniel
    (1 row)

    daniel@synapse:/vertica/test/v_test_node0001_catalog$ admintools -t show_active_db
    test
    Changes in configurations:
    $ tail /opt/vertica/config/admintools.conf
    v_sandbox_node0001 = 127.0.0.1,/vertica,/vertica
    v_test_node0001 = 127.0.0.1,/vertica,/vertica

    [Database:test]
    host = 127.0.0.1
    restartpolicy = ksafe
    port = 5433
    path = /vertica/test/v_test_node0001_catalog
    nodes = v_test_node0001
    PS
    It's complicated, dangerous and you can destroy all database(also I don't know all aftermaths), that is why Im not explaining how to do it. But Pietro already knows how to use in catalog editor...


  • Thanks for your reply Daniel..
    In this case, I'd like to ask you if I could also change the data and catalog directory of each installation so that they don't cause troubles by being the same.
  • Hi!

    Finally I found "an easiest way", but it require that database B will be down when restoring - its the only limitation.

    https://www.youtube.com/watch?v=bL5Cj5OdSPU


    PS
    I don't  write any explanation, tutorial, HOWTO, e.t.c, try to understand from video, since my environment isn't same as yours. A lot of times happened that something work to me and for others do not (and reason - environment). In video just wanna show that it's works and nothing else(it's not a tutorial).

Leave a Comment

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