bench backup
Usage
bench backup [OPTIONS]
Description
Backup sites specified. Executing the vanilla command will create a database
dump, compress it and save the data under the default backup location
./sites/{site}/private/backups.
In case a current site is set, simply running bench backup command will backup
that site.
Options
--backup-pathSet path for saving all the files in this operation--backup-path-dbSet path for saving database file--backup-path-confSet path for saving config file--backup-path-filesSet path for saving public file--backup-path-private-filesSet path for saving private file--exclude,-eSpecify the DocTypes to not backup seperated by commas--only,--include,-iSpecify the DocTypes to backup seperated by commas
Flags
--ignore-backup-confIgnore excludes/includes set in config--with-filesTake backup with private and public files--compressCompress private and public files--verboseAdd verbosity
Examples
Backing up with the site's private and public files.
bench --site {site} backup --with-filesCompress the public and private files (if required). This saves the file under a
tgzformat instead of the defaulttarformat.bench --site {site} backup --with-files --compressChange the path where the files backed up will be saved.
bench --site {site} backup --backup-path {backup_path}Change the path for a specific backup file. For each unspecified option, the respective file will be saved in the default location.
bench --site {site} backup --with-files --backup-path-conf {conf_path} --backup-path-db {db_path} --backup-path-files {files_path} --backup-path-private-files {private_path}Add verbosity for the various stages managed internally via the Bench CLI.
bench --site {site} backup --verboseBackup only certain doctypes on the site.
bench --site {site} backup --only 'ToDo,Note,Task,Project,Sales Invoice'Backup all tables except certain doctypes.
bench --site {site} backup --exclude 'Error Log,Access Log,Activity Log,Version'Backup complete site ignoring the
frappe.conf.backup.*values if specified.bench --site {site} backup --ignore-backup-conf