Transferring Maria coin Block Database

HelmutsHelmuts is verified member.

Domain Summit | HostMaria
Staff member
Joined
Dec 23, 2022
Messages
678
Reaction score
0
This guide explains how to transfer the block database from one Maria Core installation to another. Since Maria coin is a fork of Pivx with identical functionalities, the process is the same for both currencies.

What is a Block Database?

The block database, stored in the "blocks", "chainstate", "sporks", and "zerocoin" directories, contains all the information downloaded by your Maria Core node during synchronization. Copying this database can significantly speed up syncing a new installation compared to the initial download.

Important Considerations:
  • Security: Copying the database requires absolute trust in the source. Unlike the standard syncing process where blocks are validated, Maria Core assumes copied databases are accurate. A malicious database could compromise your wallet. Only copy databases from trusted sources over secure connections.
  • Completeness: The block database relies on all its files working together. Copying only a few files can lead to crashes or syncing issues in the receiving node. You must copy all files from the source database entirely.
  • Shutdown Required: Both the source and destination nodes must be shut down before and during the copy process.

Transferring the Database:

1. Shut down both Maria Core nodes.

2. Locate the block database directories:
  • Source: Identify the directories containing the block database on the source machine (usually located in the Maria Core data directory).
  • Destination: Locate the corresponding directories on the destination machine where you want the transferred database.

3. Copy the entire database:

Use a reliable file transfer method (e.g., cp command on Linux/Mac or equivalent for your OS) to copy all files from the source directories to their respective destinations on the target machine.

4. Start the destination Maria Core node.

The destination node should now have a synced block database, significantly reducing its initial syncing time.

--

Additional Notes:
  • The "blocks" directory might contain multiple blk*.dat files. Only the file with the highest number is actively written to. Consider creating a symbolic link to this directory or specific blk*.dat files if you plan to store the database on a separate drive for potential performance benefits. (Refer to Maria coin documentation for details on "Splitting the data directory".)
  • Subsequent synchronization between nodes with identical databases (achieved through copying) will be highly efficient using tools like rsync.

Remember: Security is paramount. Only copy block databases from trusted sources and exercise caution when dealing with your Maria coin wallet. Refer to the Maria coin documentation for more information about the block database and data directory management.
 
Back
Top