Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate snapshot and backup docs, remove unused #5317

Merged
merged 2 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ rustup
S3-compatible
semver
serverless
stateroots
subcommands
swappiness
TabItem
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/users/guides/advanced/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Advanced",
"position": 2
"position": 7
}
62 changes: 62 additions & 0 deletions docs/docs/users/guides/advanced/backups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Forest Backups

> "_The condition of any backup is unknown until a restore is attempted._"
> Everyone who deals with backups.

## Manual backups

The manual way requires knowledge of Forest internals and how it structures its
data directory (which is not guaranteed to stay the same). Thus, it is
recommended to use alternatives.

## Backups with the `forest-tool`

Forest comes with a `forest-tool` binary, which handles creating and recovering
backups.

### Basic usage

:warning: **The Forest node should be offline during the backup process,
especially when backing up the database**

`forest-tool backup create` will create a backup file in the current working
directory. It will contain the p2p key-pair used to derive the `PeerId` and the
keystore. If storing anywhere, make sure to encrypt it.

```shell
forest-tool backup create
```

Sample output:

```console
Adding /home/rumcajs/.local/share/forest/libp2p/keypair to backup
Adding /home/rumcajs/.local/share/forest/keystore.json to backup
Backup complete: forest-backup-2024-02-22_17-18-43.tar
```

Afterwards, you can use `forest-tool backup restore <backup-file>` to restore
those files. Note that this assumes that Forest is using the default
configuration - if it's not the case, provide the configuration `TOML` file via
the `--daemon-config` parameter.

```shell
forest-tool backup restore forest-backup-2024-02-22_17-18-43.tar
```

Sample output:

```console
Restoring /home/rumcajs/.local/share/forest/libp2p/keypair
Restoring /home/rumcajs/.local/share/forest/keystore.json
Restore complete
```

There are other flags to the backup tool, most notably `--all`, that will back
up the entire Forest data directory. Note that this includes the whole
blockstore, which, for mainnet, can reach hundreds of gigabytes. It is not
recommended outside development.

### CLI reference

Details on the `forest-tool backup` command and its subcommands can be found at the [CLI reference](../../reference/cli.md#forest-tool-backup).
37 changes: 37 additions & 0 deletions docs/docs/users/guides/advanced/generating_snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,40 @@
title: Generating Snapshots
sidebar_position: 1
---

# Snapshot exporting 📸

## Hardware requirements

To export a mainnet snapshot, you need a setup with at least 16 GB of RAM. On a
machine with rapid NVMe, the default export should take around 30
minutes.

The requirements for calibnet snapshots are lower, but it is still recommended
to have at least 8 GB of RAM. The export should take less than a minute.

## Running the node

Wait until the node is fully synced. You can use the command:

```shell
forest-cli sync wait
```

## Exporting the snapshot

To export the snapshot with the defaults, run:

```shell
forest-cli snapshot export
```

The snapshot will be exported with 2000 recent stateroots to the current directory. The snapshot will be
compressed.

For mainnet, you should expect a file of over 70 GB. For calibnet, you should
expect a file of over 5 GB. Note that the snapshot size grows over time.

### CLI reference

Details on the `forest-cli snapshot export` command and its subcommands can be found at the [CLI reference](../../reference/cli.md#forest-cli-snapshot).
1 change: 1 addition & 0 deletions docs/docs/users/guides/methods_filtering.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: RPC methods filtering
sidebar_position: 5
---

# RPC methods filtering
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/users/guides/monitoring/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Monitoring",
"position": 2
"position": 6
}
44 changes: 0 additions & 44 deletions documentation/mindmaps/2023-07-14.md

This file was deleted.

8 changes: 0 additions & 8 deletions documentation/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,20 @@
# User Guide

- [Introduction](./introduction.md)
- [Snapshot exporting](./snapshot_export.md)
- [Backups](./backups.md)
- [Troubleshooting](./trouble_shooting.md)
- [Glossary](./glossary.md)
- [Bootstrap node](./bootstrap_node.md)
- [Offline Forest](./offline-forest.md)

# Developer documentation

- [Developer documentation](./developer_documentation/introduction.md)
- [Application architecture](./developer_documentation/application_architecture.md)
- [Database migrations](./developer_documentation/database_migrations.md)
- [Local GH Actions](./developer_documentation/local_actions.md)
- [Mainnet compatibility](./developer_documentation/mainnet_compatibility.md)
- [Memory analysis](./developer_documentation/memory-analysis.md)
- [Release checklist](./developer_documentation/release_checklist.md)
- [State migration](./developer_documentation/state_migration.md)
- [State migration guide](./developer_documentation/state_migration_guide.md)
- [State migration spike NV17-NV18](./developer_documentation/state_migration_spike.md)
- [Test plan](./developer_documentation/test_plan.md)
- [Devnet Notes](./developer_documentation/devnet_notes.md)
- [Archie and Fuzzy](./developer_documentation/archie_and_fuzzy.md)
- [RPC API Compatibility](./developer_documentation/rpc_api_compatibility.md)
- [Notes and sketches](./developer_documentation/notes_and_sketches.md)
- [ChainMuxer/TipsetProcessor state machine](./developer_documentation/chain_muxer_state_machine.md)
95 changes: 0 additions & 95 deletions documentation/src/backups.md

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading