Skip to main content

Running Restic & Rclone Commands

Pluton is built on restic and rclone. It ships its own copies of both binaries and keeps rclone's remote configuration in a private config file. Sometimes you need to talk to a repository directly, for example to inspect snapshots, restore a single file, or repair a damaged index.

To make this easy, both the Pluton server and the Pluton agent create two wrapper commands during installation: prestic and prclone. They let you run any restic or rclone command using Pluton's bundled binaries and configuration, so you never have to remember binary paths, the rclone config location, or the -o rclone.program glue.

Direct backups and restores are not tracked in the Pluton UI

Pluton only records the backups and restores that it runs. Snapshots you create by running prestic backup (or your own restic) directly, and files you restore manually, will not appear in the plan's backup or restore history in the Pluton dashboard, and they will not update the plan's snapshot count or size statistics. Use direct commands for inspection, recovery, and repository maintenance, and keep your regular backups inside Pluton so the dashboard stays in sync with what is really in the repository.


Why the wrappers exist

Without the wrappers, running a restic command against a Pluton repository is verbose. You would have to:

  • Call the specific restic binary that Pluton shipped (not any restic on your PATH).
  • Tell restic which rclone binary to use for remote storage, with -o rclone.program=/path/to/rclone.
  • Point rclone at Pluton's config file with --config /path/to/rclone.conf so it can find your remotes.

The wrappers bake all of that in. prestic and prclone are thin scripts that call the bundled binaries with the right flags already filled in, then pass through whatever arguments you add.

# prclone runs the bundled rclone with Pluton's config
exec /path/to/rclone --config /path/to/rclone.conf "$@"

# prestic runs the bundled restic wired to the bundled rclone and its config
export RCLONE_CONFIG=/path/to/rclone.conf
exec /path/to/restic -o rclone.program=/path/to/rclone "$@"

Because every argument is passed straight through, any restic or rclone subcommand works. Just replace restic with prestic and rclone with prclone.


Where the wrappers live

The wrappers are installed system-wide (or added to PATH) so you can run them from any shell.

DeploymentCommandsLocation
Server (Linux)prestic, prclone/usr/local/bin
Server (Docker)prestic, prclone/usr/local/bin (inside the container)
Agent (Linux/macOS)prestic, prclone/usr/local/bin
Agent (Windows)prestic.bat, prclone.batagent bin folder, added to system PATH
note

In a Docker server deployment the wrappers exist inside the container, not on the host. Run them with docker exec, for example:

docker exec -it pluton prestic -r <repo> snapshots

Addressing a repository and password

Two things every restic command needs: which repository to act on, and the repository password.

Repository (-r). Pluton stores repositories through rclone remotes, addressed as rclone:<remote>:<path>, where <remote> is the storage name configured in Pluton and <path> is the repository path within that storage. Local storage repositories are just a filesystem path.

# Remote (S3, B2, Backblaze, etc.) storage named "my-s3", repo under backups/laptop
prestic -r rclone:my-s3:backups/laptop snapshots

# Local storage repository
prestic -r /var/lib/pluton/backups/laptop snapshots

Password. The repository password is your Pluton Encryption Key. restic will prompt for it, or you can supply it through the RESTIC_PASSWORD environment variable.

tip

To avoid repeating -r and the password on every command, export them once for your shell session:

export RESTIC_REPOSITORY='rclone:my-s3:backups/laptop'
export RESTIC_PASSWORD='<your-pluton-encryption-key>'

prestic snapshots
prestic stats

Common restic commands

Read-only commands are safe to run at any time. Use -r <repo> (or RESTIC_REPOSITORY) with each.

# List all snapshots in the repository
prestic -r <repo> snapshots

# Show repository size and statistics
prestic -r <repo> stats

# List the files contained in a snapshot
prestic -r <repo> ls <snapshotID>

# Search for a file across snapshots
prestic -r <repo> find <filename>

# Verify repository integrity
prestic -r <repo> check

# Restore a snapshot (or a single path) to a target directory
prestic -r <repo> restore <snapshotID> --target /tmp/restore
prestic -r <repo> restore <snapshotID> --target /tmp/restore --include /etc/hosts

# Remove a stale lock left by an interrupted run
prestic -r <repo> unlock

# Repair a damaged index or damaged pack files
prestic -r <repo> repair index
prestic -r <repo> repair packs
warning

Commands such as forget, prune, repair, and unlock modify the repository. Avoid running them while a Pluton backup, prune, or integrity check is active for the same repository, and prefer restoring to a new target directory so you do not overwrite live data.


Common rclone commands

prclone uses Pluton's rclone configuration, so all of your configured storages are available as remotes.

# List the remotes Pluton has configured
prclone listremotes

# Show storage usage / quota for a remote
prclone about my-s3:

# List directories and files under a remote path
prclone lsd my-s3:backups
prclone ls my-s3:backups/laptop

# Show the total size of a remote path
prclone size my-s3:backups/laptop

# Copy files out of a remote to a local folder
prclone copy my-s3:backups/laptop /tmp/pulled --progress
tip

prclone and prestic accept every flag the underlying tools do. When in doubt, run prestic help or prclone help (or prestic <command> --help) to see the full option list for the bundled version.


Using your own restic and rclone

The wrappers are a convenience, not a requirement, and Pluton does not lock you in. Every Pluton repository is a standard restic repository kept on standard storage (a local path or an rclone remote). You are free to open, restore, migrate, or maintain it with your own restic and rclone installation, from the same machine or a completely different one.

To reach a Pluton repository with your own tools you need three things:

  1. A restic binary. Any restic release that supports the repository format works. Using a version equal to or newer than the one Pluton ships is safest. Run prestic version to see the bundled version.
  2. Access to the storage. For local repositories, point restic straight at the repository path. For remote repositories, restic reaches the storage through rclone, so you need an rclone remote that points at the same storage.
  3. The repository password, which is your Pluton Encryption Key.

Local storage repository with your own restic:

restic -r /var/lib/pluton/backups/laptop snapshots

Remote (rclone-backed) repository with your own restic and rclone. Either reuse Pluton's rclone config, or define your own remote pointing at the same storage:

# Option A: reuse Pluton's existing rclone config and your own restic/rclone binaries
RCLONE_CONFIG=/var/lib/pluton/config/rclone.conf \
restic -r rclone:my-s3:backups/laptop \
-o rclone.program=/usr/bin/rclone \
snapshots

# Option B: use an rclone remote you configured yourself (via `rclone config`).
# Here "backups" is your own remote pointing at the same bucket/credentials.
restic -r rclone:backups:laptop snapshots

The only Pluton-specific details are the repository location and the encryption key. Everything else is plain restic and rclone, so your data stays portable and recoverable even without Pluton installed.

note

Remember that backups and restores you run this way are not reflected in the Pluton dashboard (see the caution at the top of this page).