GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Documentation
  • Privacy Statement
  • License Agreement
  • Contact Us

This view

  • Original page
  • New address

GeezerVison is showing docs.voltdb.com — snapshottransfer

  • Volt Active Data
  • Developer Hub
  • Books
    • VoltDB Tutorial
    • Using VoltDB
    • VoltDB Guide to Performance and Customization
    • VoltDB Administrator's Guide
    • Volt Kubernetes Administrator's Guide
    • VoltDB Quick Reference
  • VoltDB V16
    • VoltDB V16
    • VoltDB V15.3 LTS
    • VoltDB V14.3 LTS
    • VoltDB V13.3 LTS
    • VoltDB V12.3 LTS
    • VoltDB V11.4
    • VoltDB V10.2
    • VoltDB V9.3
snapshottransfer

Administrator's Guide

  • Preface▶
    • 1. Structure of This Book
    • 2. Related Documents
  • 1. Managing Volt Active Data Databases▶
    • 1.1. Getting Started
    • 1.2. Understanding the VoltDB Utilities
    • 1.3. Management Tasks
  • 2. Preparing the Servers▶
    • 2.1. Server Checklist
    • 2.2. Install Required Software
    • 2.3. Configure Memory Management
      • 2.3.1. Disable Swapping
      • 2.3.2. Disable Transparent Huge Pages
      • 2.3.3. Enable Virtual Memory Mapping and Overcommit
    • 2.4. Turn off TCP Segmentation
    • 2.5. Configure Time Services
    • 2.6. Increase Resource Limits
    • 2.7. Configure the Network
    • 2.8. Assign Network Ports
    • 2.9. Eliminating Server Process Latency
  • 3. Starting and Stopping the Database▶
    • 3.1. Configuring the Cluster and Database
    • 3.2. Initializing the Database Root Directory
    • 3.3. Starting the Database
    • 3.4. Loading the Database Definition
      • 3.4.1. Preloading the Schema and Classes When You Initialize the Database
      • 3.4.2. Loading the Schema and Classes After the Database Starts
    • 3.5. Stopping the Database
    • 3.6. Restarting the Database
    • 3.7. Starting and Stopping Individual Servers
  • 4. Maintenance and Upgrades▶
    • 4.1. Backing Up the Database
    • 4.2. Updating the Database Schema
      • 4.2.1. Performing Live Schema Updates
      • 4.2.2. Performing Updates Using Save and Restore
    • 4.3. Upgrading the Cluster
      • 4.3.1. Performing Server Upgrades
      • 4.3.2. Performing Rolling Hardware Upgrades on K-Safe Clusters
      • 4.3.3. Adding Servers to a Running Cluster with Elastic Scaling
      • 4.3.4. Removing Servers from a Running Cluster with Elastic Scaling
      • 4.3.5. Reconfiguring the Cluster During a Maintenance Window
    • 4.4. Upgrading Existing VoltDB Installations
      • 4.4.1. Upgrading the VoltDB Software
      • 4.4.2. Upgrading VoltDB Using Save and Restore
      • 4.4.3. Upgrading Older Versions of VoltDB Manually
      • 4.4.4. Performing an In-Service Upgrade of a Single Cluster
      • 4.4.5. Performing an Online Upgrade Using Multiple XDCR Clusters
      • 4.4.6. Downgrading, or Falling Back to a Previous VoltDB Version
    • 4.5. Updating the VoltDB Software License
  • 5. Monitoring VoltDB Databases▶
    • 5.1. Monitoring Overall Database Activity
      • 5.1.1. Volt Management Center
      • 5.1.2. System Procedures
      • 5.1.3. SNMP Alerts
    • 5.2. Setting the Database to Read-Only Mode When System Resources Run Low
      • 5.2.1. Monitoring Memory Usage
      • 5.2.2. Monitoring Disk Usage
    • 5.3. Integrating VoltDB with Prometheus
    • 5.4. Integrating VoltDB with Datadog
  • 6. Logging and Analyzing Activity in a VoltDB Database▶
    • 6.1. Introduction to Logging
    • 6.2. Creating the Logging Configuration File
    • 6.3. Changing the Timezone of Log Messages
    • 6.4. Managing VoltDB Log Files
    • 6.5. Enabling Your Custom Log Configuration When Starting VoltDB
    • 6.6. Changing the Configuration on the Fly
  • 7. What to Do When Problems Arise▶
    • 7.1. Where to Look for Answers
    • 7.2. Handling Errors When Restoring a Database
      • 7.2.1. Logging Constraint Violations
      • 7.2.2. Safe Mode Recovery
    • 7.3. Collecting the Log Files
  • A. Server Configuration Options▶
    • A.1. Server Configuration Options
      • A.1.1. Network Configuration (DNS)
      • A.1.2. Time Configuration
    • A.2. Process Configuration Options
      • A.2.1. Maximum Heap Size (VOLTDB_HEAPMAX)
      • A.2.2. Garbage Collector (VOLTDB_GC_OPTS)
      • A.2.3. Other Java Runtime Options (VOLTDB_OPTS)
    • A.3. Database Configuration Options
      • A.3.1. Sites per Host
      • A.3.2. K-Safety
      • A.3.3. Snapshot Management
      • A.3.4. Import and Export
      • A.3.5. Command Logging
      • A.3.6. Heartbeat
      • A.3.7. Temp Table Size
      • A.3.8. Query Timeout
      • A.3.9. Flush Interval
      • A.3.10. Long-Running Process Warning
      • A.3.11. Copying Array Parameters
      • A.3.12. Clock Skew
    • A.4. Path Configuration Options
      • A.4.1. VoltDB Root
      • A.4.2. Snapshots Path
      • A.4.3. Export Overflow Path
      • A.4.4. Command Log Path
      • A.4.5. Command Log Snapshots Path
    • A.5. Network Ports
      • A.5.1. Client Port
      • A.5.2. Admin Port
      • A.5.3. Internal Server Port
      • A.5.4. Metrics Port
      • A.5.5. Replication Port
      • A.5.6. Zookeeper Port
      • A.5.7. TLS/SSL Encryption (Including HTTPS)
  • B. Volt Active Data Metrics▶
    • B.1. Database Tables and Indexes
    • B.2. Transactions, Procedures, and the Planner
    • B.3. Memory and CPU Usage
    • B.4. Client Connections and I/O
    • B.5. High Availability and Durability
    • B.6. Streaming Data
    • B.7. User-Defined Tasks
    • B.8. System and Cluster Status
  • C. Snapshot Utilities▶
    • snapshotconvert
    • snapshottransfer
    • snapshotverifier

snapshottransfer

snapshottransfer — Transfers a snapshot to external storage in either one of two formats.

Synopsis

snapshottransfer [--servers {server-url[:port]}[,...]]
[--destination {path-or-url}]
[--format {csv|parquet}]
[--ssl {ssl-config-file}]
[--new]
[--dry-run]

[destination-specific-qualifiers...]
[format-specific-qualifiers...]
[ssl-security-qualifiers...]

Description

SnapshotTransfer sends the latest snapshot to an external storage system, which can be local disk storage, Amazon S3 storage, or Google Cloud storage. The argument to the --destination qualifier determines the target of the transfer. For example, a directory path will save the output to a local file system. A URL starting with "gs://" will send the output to Google cloud storage, while a URL starting "s3://" will deliver the files to an S3 "bucket". You can also specify the format of the output with the --format qualifier The default is comma-separated value (CSV) files. The alternative is Parquet format.

By default. SnapshotTransfer copies the latest snapshot. If you specify --new, it first initiates a new snapshot and then sends that to the target destination.

The global qualifiers for the snapshottransfer command are:

--servers {server-url[:port]} [,...]

Specifies the source of the snapshot as the client port(s) of one or more nodes of a VoltDB database. The default is "http://localhost:21212".

--destination {path-or-url}

Specifies where the files are to be sent. A file path indicates the files will be saved to local disk storage. A URL starting "s3://" identifies an Amazon S3 bucket. A URL starting "gs://" identifies a Google Cloud storage destination. The default is the user's current default working directory.

--format {csv|parquet}

Specifies the format of the generated files. The options are either comma-separated value (CSV) or Parquet format. The default is CSV.

--ssl {ssl-properties-file}

Specifies the use of TLS/SSL encryption when communicating with the database server. Only necessary if the cluster is configured to use TLS encryption for the external ports. See the section called “Using CLI Commands with TLS/SSL” in the Using VoltDB manual for more information.

--new

Initiates a new snapshot and sends its contents to the destination. If the --new qualifier is not specified, the most recent snapshot is used as input.

--dry-run

Verifies that the command arguments are valid and that the command can be executed. No data is actually transferred during a dry run.

Destination Specific Qualifiers

Depending on the destination type, you may need to provide destination-specific information to complete the transfer. The following tables describe the qualifiers specific to Amazon S3 and Google Cloud delivery.

Amazon S3 Qualifiers
QualifierDescription
--s3-regionThe region where the snapshot will be stored. This is a required value, there is no default.
--s3-endpointFor S3-compatible services other than Amazon, the host name address of the provider. At runtime, this host name is combined with the --destination to create the target URL {hostname}/{destination}. For Amazon, the host name is generated automatically and this qualifier is not needed.
--s3-access-key-idThe account access key ID.
--s3-secret-access-keyThe account secret access key.
--s3-credentialsA properties file specifying the access-key-id and secret-access-key values. You can either provide the credentials on the command line using the --s3-access-key-id and --s3-seret-access-key qualifiers, or you can use --s3-credentials and a properties file to avoid including sensitive information on the command line itself.
Google Cloud Qualifiers
QualifierDescription
--gcp-projectAn optional Google Cloud project ID. For informational purposes only.
--gcp-credentialsThe path to a JSON key file containing the Google account credentials.

Format Specific Qualifiers

Depending on the output format chosen, you can customize the delivery using format-specific qualifiers. The following tables describe the qualifiers specific to CSV and Parquet output.

CSV Qualifiers
QualifierDescription
--csv-separatorThe field delimiter. The default is a comma (,).
--csv-quotecharThe quote character. The default is the double quotation mark (").
--csv-escapeThe escape character. The default is the backslash (\).

--csv-header
--no-csv-header

Whether column names are included as the first line. Column names are included by default.
--csv-charsetThe output encoding. The default is UTF-8.
--csv-null-stringHow null values are represented. The default is an empty space.
Parquet Qualifiers
QualifierDescription
--parquet-compressionWhich compression codec to use. Supported codecs include SNAPPY, ZSTD, and UNCOMPRESSED. The default is SNAPPY.
--parquet-row-group-size-mbThe row group size in megabytes. The default is 256.

Usage

Unlike the other snapshot utilities that operate on existing local files regardless of the database state, snapshottransfer requires access to a running VoltDB database to perform its tasks. On the other hand, the snapshottransfer command transfers the snapshot files for the entire database cluster with a single command, not just partial files from a single server.

When you invoke snapshottransfer, your local process acts as the transport for the files. It receives the data from the Volt server(s) and then sends it to the target destination. This means your terminal session will not return to the command prompt until the transfer is complete (or an error occurs). If the current process stops for any reason (for example, if you press CTRL/C), the transfer will be interrupted.

Both CSV and Parquet format are transmitted as multiple files The files are organized into a directory structure:

  • The top level is a directory named after the snapshot itself.

  • Within the top level directory, there are subdirectories for each table.

  • Within each table directory there can be multiple files that contain the table data.

  • At both the top level and in each table directory, there is a zero-byte file called _SUCCESS indicating that the transfer of the table contents or database as a whole has been completed successfully.

For example, saving CSV files of a database with two tables to the local directory /var/archive/ might create the following file structure:

 /var/
    archive/
       snapshot-20260824T143022/
          ORDERS/
             part-00000.csv
             part-00001.csv
             _SUCCESS
          CUSTOMERS/
             part-00000.csv
             _SUCCESS
          _SUCCESS

Examples

The following command transfers the most recent database snapshot to an Amazon S3 bucket in the us-east-2 region in Parquet format. The credentials for accessing S3 are provided on the command line in the --s3-access-key-id and --s3-secret-access-key qualifiers:

$ snapshottransfer --servers mydbserver1:21212 \
  --format parquet \
  --destination s3://mycompany/snapshots/ \
  --s3-region us-east-2 \
  --s3-access-key-id myaccesskey \
  --s3-secret-access-key topsecret

The next example initiates a new snapshot and then transfers its contents to Google Cloud storage as CSV files. In this case, The credentials for accessing S3 are provided in the properties file ~/credentials/googlecred.properties:

$ snapshottransfer \
  --servers mydbserver1:21212 \
  --new \
  --format csv \
  --destination gs://mycompany/snapshots/ \
  --gcp-credentials ~/credentials/googlecred.properties
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.