Previous Next JavaScript must be enabled to correctly display this content

## Load Shard Data from Backup

This section explains how you can load shard data from the backup.

Load the shard data from the replication masters of all the 3 shards. The snapshots of the masters are available in the following locations:

    kvroot1/mystore/sn2/rg1-rn2/snapshots/250514-072244-Wednesday
    kvroot/mystore/sn1/rg2-rn1/snapshots/250514-072244-Wednesday
    kvroot/mystore/sn1/rg2-rn1/snapshots/250514-072244-Wednesday

Load data from the first shard:

    java -Xmx64m -Xms64m -jar lib/kvstore.jar load -source kvroot1/mystore/sn2/rg1-rn2/snapshots/250514-072244-Wednesday -store mystore -host phoenix581601 -port 5000 -security kvroot2/security/client.security
    Login as:root
    root's password: <password>

Output:

    2025-05-16 06:15:46.204 UTC [LOAD] Load 9 records, 9 records skipped, 0 pre-existing records from p1 of kvroot1/mystore/sn2/rg1-rn2/snapshots/250514-072244-Wednesday: 0.017s
    2025-05-16 06:15:46.239 UTC [LOAD] Load 9 records, 9 records skipped, 0 pre-existing records from p10 of kvroot1/mystore/sn2/rg1-rn2/snapshots/250514-072244-Wednesday: 0.014s
    2025-05-16 06:15:46.242 UTC [LOAD] Load 14 records, 14 records skipped, 0 pre-existing records from p11 of kvroot1/mystore/sn2/rg1-rn2/snapshots/250514-072244-Wednesday: 0.013s
    2025-05-16 06:15:46.243 UTC [LOAD] Load 9 records, 9 records skipped, 0 pre-existing records from p13 of kvroot1/mystore/sn2/rg1-rn2/snapshots/250514-072244-Wednesday: 0.001s
    ....
    ....
    ....
    2025-05-16 06:15:46.319 UTC [LOAD] Load 8 records, 7 records skipped, 1 pre-existing records from p32 of kvroot1/mystore/sn2/rg1-rn2/snapshots/250514-072244-Wednesday: 0.036s

    Load succeeded, wrote 0 records

Load data from the second shard

    java -Xmx64m -Xms64m -jar lib/kvstore.jar load -source kvroot/mystore/sn1/rg2-rn1/snapshots/250514-072244-Wednesday -store mystore -host phoenix581601 -port 5000 -security kvroot2/security/client.security
    Login as:root
    root's password:<password>

Output:

    2025-05-14 09:36:22.315 UTC [LOAD] Load 24 records, 24 records skipped, 0 pre-existing records from p36 of kvroot/mystore/sn1/rg2-rn1/snapshots/250514-072244-Wednesday: 0.037s
    2025-05-14 09:36:22.351 UTC [LOAD] Load 18 records, 18 records skipped, 0 pre-existing records from p35 of kvroot/mystore/sn1/rg2-rn1/snapshots/250514-072244-Wednesday: 0.039s
    2025-05-14 09:36:22.357 UTC [LOAD] Load 12 records, 12 records skipped, 0 pre-existing records from p39 of kvroot/mystore/sn1/rg2-rn1/snapshots/250514-072244-Wednesday: 0.001s
    ....
    ....
    ....
    2025-05-14 09:36:22.492 UTC [LOAD] Load 27 records, 13 records skipped, 14 pre-existing records from p63 of kvroot/mystore/sn1/rg2-rn1/snapshots/250514-072244-Wednesday: 0.064s

    Load succeeded, wrote 0 records

Load data from the third shard

    java -Xmx64m -Xms64m -jar lib/kvstore.jar load -source kvroot/mystore/sn1/rg3-rn1/snapshots/250514-072244-Wednesday -store mystore -host phoenix581601 -port 5000 -security kvroot2/security/client.security
    Login as:root
    root's password:<password>

Output:

    2025-05-14 09:37:04.554 UTC [LOAD] Load 18 records, 18 records skipped, 0 pre-existing records from p68 of kvroot/mystore/sn1/rg3-rn1/snapshots/250514-072244-Wednesday: 0.017s
    2025-05-14 09:37:04.572 UTC [LOAD] Load 17 records, 17 records skipped, 0 pre-existing records from p69 of kvroot/mystore/sn1/rg3-rn1/snapshots/250514-072244-Wednesday: 0.011s
    2025-05-14 09:37:04.575 UTC [LOAD] Load 20 records, 20 records skipped, 0 pre-existing records from p70 of kvroot/mystore/sn1/rg3-rn1/snapshots/250514-072244-Wednesday: 0.001s
    ....
    ....
    ....
    2025-05-14 09:37:04.699 UTC [LOAD] Load 12 records, 11 records skipped, 0 pre-existing records from p89 of kvroot/mystore/sn1/rg3-rn1/snapshots/250514-072244-Wednesday: 0.046s

    Load succeeded, wrote 1 records

Now, we have loaded data from all the 3 shards.