- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Phoenix backup
- Labels:
-
Apache HBase
-
Apache Phoenix
Created ‎07-26-2016 07:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are primarily using the phoenix interface to access hbase (created tables, store and delete data). what is the best way to back up phoenix tables. Is there a way of doing it automatically in ambari or is anyone following a practice for this.
Created ‎07-26-2016 07:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Phoenix tables are the same as HBase tables so as per your need, you can use any backup method available in hbase.
http://hbase.apache.org/book.html#ops.backup
Taking a snapshot of all SYSTEM tables and user tables and exporting in some cold storage is an good option until incremental backup and restore feature in hbase got released (though active development is going on so expected to be released soon in HDP).
Created ‎07-26-2016 07:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Currently there is no backup functionality specific for Phoenix. Meanwhile you may use HBase snapshots. You need to snapshot SYSTEM tables as well as user tables. In the next release of HDP there will be HBase backup functionality. And hopefully quite soon we will see Phoenix backup based on it.
Created ‎07-26-2016 07:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right now there is now way we can do it in ambari.
You will have to write custom scripts to take the backup. Use import/export or snapshot features of HBase to take the backups.
Created ‎07-26-2016 07:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Phoenix tables are the same as HBase tables so as per your need, you can use any backup method available in hbase.
http://hbase.apache.org/book.html#ops.backup
Taking a snapshot of all SYSTEM tables and user tables and exporting in some cold storage is an good option until incremental backup and restore feature in hbase got released (though active development is going on so expected to be released soon in HDP).
Created ‎07-26-2016 08:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Ankit. but if we need to restore the hbase tables from snapshots and if they gets restored as hbase tables. will we need to build a view on top of the hbase tables to access it as phoenix tables.
Created ‎07-26-2016 08:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
when you restore SYSTEM tables too, the metadata of all tables will be available , so you don't need to create any metadata again(like view/table) to access the user tables.
Created ‎07-26-2016 09:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Ankit. this helps.
Created ‎03-16-2017 01:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is what I wrote:
cat <<EOF | /usr/hdp/current/phoenix-client/bin/sqlline.py localhost:2181:/hbase-unsecure &> /dev/null !brief !set outputformat csv !set showwarnings false !set silent true !set headerinterval 0 !set showelapsedtime false !set incremental true !set showheader true !record /shared/backup.csv select * from d.test_table; !record !quit EOF
Working well so far (13M rows) after implementing suggestions here: https://community.hortonworks.com/content/supportkb/49037/phoenix-sqlline-query-on-larger-data-set-f...
Created ‎03-20-2019 05:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Do you have any suggestion for backing up and restore only 1 Phoenix table ? I believe if we restore the system table, it will have impact to all others, won't it ?
Many thanks,
Tu
