Skip to main content
lua pull overwrites the files in your project with a source backup stored on the server, either the most recent one or the one linked to an agent version, and records the restored state as a new source version. It changes nothing for end users. Verified against lua-cli 3.33.0.

Synopsis

Description

Every lua push records a backup of your project files as a numbered source version (see lua source), and every agent version links to the source version that was current when it was created. Without flags, lua pull restores the latest source version. With --version <n>, it looks up agent version n and restores the source version linked to it; a version without a linked backup fails with Version v<n> has no source backup linked. Cannot pull source for this version. The restore downloads the backed-up files and overwrites the working copy. It then records the result as a new source version, so the history stays append-only and lua source list shows a new entry after every pull. Files that exist locally but not in the backup are left in place. Before writing, the command asks Rolling back to v<n> will overwrite local files and create a new version. Continue? unless you pass --force. The global --ci flag does not suppress this prompt, so automation must pass --force. Unlike lua sync --pull, lua pull performs no local-changes check: edits in files the backup contains are lost. Commit them, or run lua push backup first so they become the latest backup. With lua git connect enabled, the restored files are committed automatically. The command needs a project and a credential. Pulling never changes what is live; to change the live agent, promote a version with lua version promote.

Arguments

None.

Options

Examples

Restore the most recent backup, for example on a fresh machine after lua init --agent-id <id>:
Check out the exact source behind agent version 3 before deciding whether to promote it:
Restore without a prompt, in a script:
The command prints which backup it restores, Pulling latest source backup (v<n>)… or Pulling source for agent version v<n> (backup v<m>)…, followed by the backup push that records the new source version.

Exit codes

See also