Pular para o conteúdo principal

Linha de comando

Gerada a partir do salvo --help da Salvo Backup 0.4.99. A linha de comando é sempre em inglês. Rode salvo --help no seu servidor para a versão instalada.

usage: salvo <command> [--state DIR] [options] (the old Portuguese names still work as aliases)
--state DIR database, vault and engine cache (default /var/lib/salvo)

jb-import [--apply] [--from DIR]
Reads the JetBackup 5 configuration and shows what comes in. Without --apply it only simulates.
destination-add --name N --type local|sftp --path P [--host H --port N --user U
--password-from FILE | --key-from FILE --known-hosts-from FILE] [--cache-mb N] [--compression ALG] [--mode por-conta|unico]
[--connections N]
Password/key come from a file (an argument shows in ps). known_hosts is required for sftp.
job-priority --job ID --restore server|low|normal
Priority of restores of this job's backups (cPanel recreating the account and MySQL importing). server follows
the restore_prioridade setting (default low). Same as POST /api/jobs/{id}/priority.
search TEXT finds accounts, domains, mailboxes, databases and jobs (same as GET /api/search and the
search bar at the top of the WHM screen)
version shows the Salvo version (also GET /api/version and the screen's sidebar)
destination-test --destination ID
Tests the connection with the storage step by step: network, SSH (server key and login), the folder, writing and
reading a test file (deleted right after) and the latency. Same as POST /api/destinos/{id}/testar.
destination-measure [--destination ID] (alias destino-medir) measures the free space now; POST /api/destinos/{id}/medir
destination-connections --destination ID [--connections N]
Shows or sets how many connections the Salvo opens with an SFTP storage at once (1 to 32; default 1). The SFTP
server answers one request at a time per connection, so a slow storage disk sits idle with only one; more
connections keep it busy. Takes effect on the next backup or restore. Same as POST /api/destinos/{id}/conexoes
and the WHM screen (Jobs and destinations > destination > Connections).
job-create --name N --destination ID (--dir D ... | --mysql DB ... | --account CPANEL ...) [--parallel N]
Creates a folder, database or account job (for accounts, job-add has the full options).
job-exclusions --job ID [--add P ...] [--remove P ...] [--default] [--clear]
Shows and edits the job exclusions (JetBackup style, relative to the home). Without options, only shows.
account-export --job ID --account C --to DIR [--folder]
Builds the cPanel cpmove-<account>.tar.gz from the latest good backup (for restorepkg on any server).
run --job ID back up now (alias rodar)
verify --job ID restores the latest backup of each item into a temporary folder and compares it with the source
schedule-run (alias agenda)
Runs the jobs whose schedule is due (for cron to call every minute; one runner at a time). A missed time (server
down) is caught up if it passed less than agenda_janela_horas ago (default 12).
alert-channel --type email --to A[,B] [--from X] [--smtp host:port --user U --password-from FILE] [--levels erro,aviso]
alert-channel --type webhook --url URL [--secret-from FILE] [--levels erro]
alert-channel --list | --remove ID
Without --smtp, email goes through the server's own mail server (sendmail), like JetBackup.
The webhook carries the signed JSON (X-Salvo-Assinatura: sha256=HMAC) when there is a secret.
alert-test sends a test message to every channel
alerts shows the current problems (the same as the panel and zabbix.json)
job-show a job as the Jobs screen opens it: --job N [--json]
job-edit change an account job: --job N [--name --destination --account... --parallel --default-exclusions yes|no --db-format --restore-priority]
job-duplicate copy a job (without schedule): --job N --name X
job-pause pause (or --resume) only the schedule: --job N
job-delete delete a job: --job N --confirm NAME [--with-backups]
restore-summary the Restore screen: running now, totals, history with who asked (--since 24h|7d|30d, --json)
safety-copies what was there before each replace; --keep PATH / --unkeep PATH (--json)
runs the Executions screen: running, next, totals and the runs of the period (--since 24h|3d|7d|30d, --json)
run-show one run: summary, accounts, compared with the previous (--execution N, --json)
run-seen --execution N mark a failed run as seen by the team (it leaves the failure banner of the Runs screen)
tasks [--json] what is running, queued or finished in the last 2 h (backups, restores, migrations), with the
live step and the last signal — the same as the activity center and GET /api/tasks
logs everything Salvo logged on this server (the Logs screen): --since 1h|24h|7d, --level, --source, --job, --account, --search, --json
server-profile this server's profile (panel, system, PHP, database, web, mail, IP, disks, packages), saved to
<state>/server-profile.json; --json prints the file to import on the other server
server-import FILE reads another server's profile (- = stdin): ssh other salvo server-profile --json | salvo server-import -
servers this server and the imported ones (--json)
server-compare what the destination has and lacks to receive the source accounts: --from HOST|local [--to HOST|local] (--json; exit 2 if blocked)
server-remove HOST forgets an imported profile
admins the administrators (name, e-mail, status, 2-step, recovery codes left, devices, last access)
admin-invite --name N --email E [--send]: invites an administrator (prints the invitation code)
admin-unlock / admin-suspend NAME|EMAIL|ID
admin-reset NAME|EMAIL|ID: emergency — resets the 2-step verification (even of the last administrator) and prints a
new invitation code; recorded in the Audit as sensitive
audit [--period 24h|7d|30d|365d] [--category C] [--actor A] [--q TEXT] [--sensitive] [--automatic] [--json]:
who did what in the Salvo, when and from where (same as the Audit screen)
audit-verify checks the audit hash chain (was the database changed outside the Salvo?)
self-update [--check] [--url U --user U --password-file F]: updates this Salvo from the download folder
(sha256 checked, panel screen reinstalled); credentials are saved for next time
whm-install [--state DIR]: the Salvo screen in WHM (Plugins > Salvo Backup), root only; checks itself
whm-uninstall removes the WHM plugin (the state folder stays)
source-accounts --from HOST [--json]: the accounts of a paired source (size, owner, suspended, mail node and its
size when the node is paired here), to choose which one to migrate
migrate-send (source) sends one part of an account to stdout: --account X --part skeleton|files|database|mail|inventory
[--database DB] [--mailbox USER@DOMAIN] (mail: Dovecot's dsync-server on stdin/stdout)
migrate-start (destination) checks the requirements with the source inventory (stdin) and registers the migration:
--from HOST [--account X] [--check-only]; prints the number; exit 2 when a requirement blocks
migrate-receive (destination) receives a part from stdin: --migration N --part skeleton|files|database|mail
[--database DB] [--mailbox USER@DOMAIN]. Runs again on a migrated account = sync again
(mail: doveadm backup -R, the destination mirrors the source; the source only reads)
migrate-verify (destination) reads the source inventory from stdin, compares and closes: --migration N
migrations accounts migrated to this server (--json)
server-pair pairs with a source server: --host H --port P --binary PATH --remote-state DIR; prints the line for the
source's /root/.ssh/authorized_keys (forced to peer-serve: read-only migration requests only)
server-pair-test checks the channel: --host H
migrate-account the whole migration through the channel: --from H --account X [--check-only]
migrate-sync sync again a migrated account: --migration N --part mail|files|databases|verify [--mailbox M]
peer-serve (source, forced by authorized_keys) answers the destination's read-only requests
migration-requests (source) the access requests other servers made for its accounts (--json)
migration-access (source) --id N --approve [--hours 48] | --refuse | --revoke: every part of an account is served
only to a destination with a valid release
peers (source) destinations authorized in /root/.ssh/authorized_keys (--json)
peer-authorize (source) --line "…": adds a destination's pairing line (only the exact gatekeeper line)
peer-revoke (source) --key …XXXXXXXXXXXX: removes it
server-unpair (destination) --host H: forgets the pairing with a source
migrate-close (destination) --migration N: closes it — deletes its temporary files (database grants), no more syncs
migrate-cancel (destination) --migration N: cancels what is running for that account (migration or sync)
da-install (DirectAdmin) installs the screens: the admin plugin, the local service (127.0.0.1, token) and
its tokens: [--address 127.0.0.1:8899]
da-uninstall (DirectAdmin) removes the plugin, the service and the tokens
da-plugin (internal) the plugin's admin/index.raw: passes each request to the local service
zabbix shows zabbix.json (the Zabbix agent reads it with UserParameter=salvo.estado,cat <state>/zabbix.json)
schedule-show shows each job's schedule, retention and next run
job-agenda --job ID --hora HH:MM [--diaria DIAS --guardar-diaria N] [--semanal DIA --guardar-semanal N]
[--mensal DIAS --guardar-mensal N] [--a-cada-horas H --guardar-horas N] | --job ID --limpar
(Portuguese alias of job-schedule.) Weekdays as in JetBackup: 1 = Sunday … 7 = Saturday.
destination-measure [--destination ID]
Measures the total and free space of each active destination (or one) and records it; backups also measure at the end.
config [--log-nivel N] [--log-retencao-dias D] [--set KEY=VALUE ...] [--list]
--set changes any setting of the Settings screen (same checks as the screen and POST /api/config), e.g.
--set restore_paralelo=8 --set backup_paralelo=0 --set destino_cache_manter=sim. --list shows them all.
Server defaults. Without options, only shows. Levels: depuracao, info, aviso, erro (default info);
log retention in days (default 30; 0 = never deletes). --log-level / --log-retention-days.
job-add --name N --destination ID --account USER [--account USER ...] [--parallel N] [--no-default-exclusions]
[--db-format dump|tables] [--restore-priority server|low|normal]
Creates an account backup job (full account: configuration, home and databases; cPanel or DirectAdmin). Same as the WHM screen
(Backup jobs > Create job) and POST /api/jobs. Then set its schedule with job-schedule.
--db-format: dump (default) keeps each database as one file; tables keeps the same consistent dump cut into one
file per table, so restoring one table fetches only it from the destination (uses a temporary folder the size
of the dump during the backup).
run --job ID back up now (same as the "Run now" button and POST /api/jobs/{id}/run)
job-schedule --job ID [--time HH:MM] [--daily DAYS --keep-daily N] [--weekly DAY --keep-weekly N]
[--monthly DAYS --keep-monthly N] [--every-hours H --keep-hourly N] [--keep-manual N] [--clear]
Shows or sets the job's schedules, JetBackup-style (weekdays 1 = Sunday … 7 = Saturday), and how many manual
backups to keep (0 = all). Changing a schedule keeps its history. Without options, shows. Also in the API
(GET/POST /api/jobs/{id}/schedule) and in the WHM screen.
restore-package --file cpmove-USER.tar.gz [--user NEWNAME] [--mode new|replace] [--no-safety-backup] [--suspend]
[--plan PLAN] [--owner RESELLER]
Restores a standard cPanel package with cPanel's restorepkg and records what the package had, what came back
(domains, mailboxes, messages, databases, files, cron) and the server's CPU, disk I/O, disk and inode use while
it ran. The account must not exist yet. Same as the WHM screen (Restore) and POST /api/restores.
restore-account --job ID --account USER [--execution N] [--user NEWNAME] [--mode new|replace|merge]
[--no-safety-backup] [--suspend] [--plan PLAN] [--owner RESELLER] [--exclude PATH ...]
Account restore options (both commands): new = the account must not exist; replace = a package of the current
account is kept in <state>/safety (unless --no-safety-backup), then it is terminated and restored; merge = the
account stays live and only what is missing comes back (files, each mailbox, databases that are gone).
Restores an account straight from its Salvo backup (latest good run, or --execution N): builds the cPanel
package from the storage and restores it like restore-package, with the same statistics and checks. Same as
the WHM screen (Restore > From a Salvo backup) and POST /api/restores {"job","account","execution"}.
backup-list --account USER
The account's backups (all jobs), newest first: run, date, job, status, items and size.
restore-config --job ID --account USER --item cron|dns|ssl|ftp|dbuser [--name NAME] [--mode MODE] [--execution N]
One item of the account configuration, alone, through cPanel's tools:
cron merge (append missing lines; default) or replace (the crontab of the backup; the current one is kept)
dns --name DOMAIN; merge (add missing records; default) or replace (the zone of the backup; a copy is kept)
ssl --name DOMAIN; install the certificate of the backup (refused if it expired; the current one is kept)
ftp [--name user@domain]; recreate the FTP accounts that are gone, same password and folder
dbuser [--name USER]; recreate the database users that are gone, same password and privileges
backup-lock --job ID --account USER --execution N [--until YYYY-MM-DD] [--note TEXT] [--unlock]
Lock one backup of the account so retention never deletes it (until the date, or forever), with a note.
--unlock removes the lock; --note alone changes only the note.
backup-show --job ID --account USER --execution N [--config]
What one backup holds: home size and files, each mailbox (messages, size) and each database.
backup-ls --job ID --account USER --execution N [--path DIR]
Browses the account's home inside that backup (nothing is restored). Same as the WHM screen and the API
(GET /api/accounts/{account}/backups[/{job}/{execution}[/files?path=]]).
restore-database --job ID --account USER --database DB [--execution N] --mode replace|new [--target NEWDB]
[--table T ...]
Restores one database from the account's backup. replace: the same database (a compressed safety copy of the
current one is kept in <state>/safety first; a deleted database is recreated). new: into NEWDB (account_
prefix), created through cPanel, with the same users. Shows tables and rows before and after.
--table (repeatable): only these tables. replace changes just them (the safety copy is of the whole database);
new creates NEWDB with just them. Routines, events and views are not restored with --table.
restore-mailbox --job ID --account USER --address BOX@DOMAIN [--execution N] --mode merge|folder [--folder NAME]
[--expire-days N]
Restores one mailbox from the account's backup into the live account. merge: only the messages that are
missing (the live ones and their flags are kept; deleted folders come back). folder: everything into a separate
folder inside the mailbox (default Restored-<date>), subscribed for the webmail. A deleted mailbox is recreated
with its quota and old password. The mailbox is reindexed at the end.
--expire-days N (mode folder, 1 to 365): the restored folder is deleted after N days by the agenda executor.
restore-expire [--keep RESTORE_ID] [--run]
Lists the restored mailbox folders waiting to be deleted. --keep cancels the deletion of one (the folder stays).
--run deletes the expired ones now (the agenda executor does it on every pass). Same as
POST /api/restores/{id}/keep-folder and the button on the restore screen.
restore-files --job ID --account USER --path P [--path P2 ...] [--execution N] --mode merge|overwrite|folder
Restores files and folders of the account's home (paths relative to it). merge: only what is missing, nothing
is overwritten. overwrite: the backup version replaces the live one (the live one is kept first in
<state>/safety; identical files are left alone). folder: everything into salvo-restaurado-<date>/ in the home.
Owner is the account; nothing is written through a symbolic link.
database-export --job ID --account USER --database DB [--execution N] --to DIR
Writes the database dump (.sql) from the backup into DIR, without touching the server.
restore-check (--file cpmove-USER.tar.gz | --job ID --account USER [--execution N]) [--user NEWNAME]
Checks, before restoring, what the account needs against what this server has: account name, domains and
databases already in use, plan, feature list, PHP versions, IP, owner and disk. Nothing is restored. The same
check runs at the start of every account restore (a blocking item stops it).
restore-list [--id N]
Restore history, or one restore in detail.
restore-accounts (--job ID (--account USER,USER... | --all) | --package cpmove-A.tar.gz,... | --all-packages) [--before YYYY-MM-DD] [--only-missing] [--mode new|replace|merge]
[--no-safety-backup] [--suspend] [--plan PLAN] [--owner RESELLER] [--exclude PATH ...] [--method M]
[--prefetch | --no-prefetch] [--wait]
Puts several account restores in the restore queue as one batch, with the same options. --before takes each
account's latest backup up to that day; --only-missing leaves out the accounts that exist on this server.
replace restores an account that is not here as new; new skips the accounts that exist; merge skips those that
do not. --package / --all-packages restore cPanel packages from the packages folder (setting restore_package_dir)
instead of Salvo backups (new or replace). The queue runs one restore at a time, in order; --wait runs it here instead of in the background.
Same as the WHM screen (Restore > Several accounts) and POST /api/restores/batch.
restore-queue [--run]
The restore queue now: the one running, the ones waiting, each with why it waits and estimates. --run is the
queue worker (the screen and restore-accounts start it; one at a time).
restore-cancel (--id N | --batch N)
Takes a restore that has not started out of the queue, or stops a batch: what has not started is cancelled and
the restore running now finishes. A running restore is never stopped halfway.
cancel (--execution N | --job N)
Stops a backup run that is going on (the one of the job, with --job). What was already copied stays; the
account in progress is not recorded; the run ends as cancelled (no failure alert). Same as the Cancel button
on the screen (Runs, and after "Back up now" on Accounts) and POST /api/execucoes/{id}/cancel.
restore-retry --batch N
Queues again, in the same batch, the accounts whose last try failed or was interrupted.
job-log --job ID [--level N | --default]
Log level of one job (overrides the server's); --default follows the server again.
run --job ID [--log-level N] the level applies to this run only (to investigate without changing the job)
serve [--address 127.0.0.1:8890] [--language en|pt]
API and screens. Listens only on the local address; WHM reaches it through a CGI. (alias servir)
jb-transition [--json] [--refresh]
The "Bring from JetBackup" assistant: what the JetBackup has, the 8 steps and what is approved (same as the
screen Server > Bring from JetBackup and GET /api/jb/transition). --refresh reads the JetBackup again now.
jb-transition-start step 1: reads the JetBackup and starts the transition (nothing is written)
jb-transition-destination --destination JB_ID [--fetch-key] [--confirm-key|--unconfirm-key] [--folder F] [--test]
[--approve|--unapprove]
Step 2, in this order: fetch the storage key (prints the fingerprints to check), confirm it, set the Salvo
folder (default <JetBackup path>/salvo; never inside jetbackup_*), test it (creates the folder, empty) and
approve. Nothing goes to the Salvo destinations before jb-transition-import.
jb-transition-job --job JB_ID --mode paused|active|skip|none
Step 3: how the job comes in (no default): paused = schedule paused; active = runs with the JetBackup; skip =
not imported; none = undo the choice.
jb-transition-import step 4: writes only what was approved, item by item (a failure stays in its item)
jb-transition-orphans [--keep N --days N] [--account A --decision rule|delete|keep|none]
Step 7 (stored only; the recycling applies it later): the rule for the JetBackup backups of deleted accounts
(keep the N most recent, for N days after the account was deleted) and the decision for one account.
All of them take --from DIR (the JetBackup answers in <function>.json files, instead of jetbackup5api).