You can configure and enable automatic backup jobs. You can specify how often you want the backup job to run automatically.
Note
You can schedule automatic backup jobs only using the CLI.
Admin access
Sufficient storage for automatic backups
Important
Additional space is required when you schedule automatic backups to run frequently. You must monitor the generated backups and delete the unnecessary backups.
Scheduling automatic backups using the CLI
Use the commands in this section to schedule automatic backups for the database.
Go to CLI configuration mode:
hostname > enable hostname # configure terminal
Create the job by specifying the job ID.
hostname (config) # job <jobID>
Note
To delete a job, use
no job <jobID>.Specify the sequence number for the scheduled backup job.
hostname (config) # job <jobID> command <sequenceNumber>
Use the
backup profilecommand to specify the type of profile.hostname (config) # job <jobID> command <sequenceNumber> "backup profile <profile>"
To schedule the backup job for the configuration database:
hostname (config) # job <jobID> command <sequenceNumber> "backup profile config"
To schedule the backup job for the Trellix appliance:
hostname (config) # job <jobID> command <sequenceNumber> "backup profile fedb"
To schedule the backup job for both the configuration database and the Trellix appliance:
hostname (config) # job <jobID> command <sequenceNumber> "backup profile config+fedb"
To schedule the backup job for the configuration database, Trellix appliance database, and detected data (malware, alerts, reports, and so on):
hostname (config) # job <jobID> command <sequenceNumber> "backup profile full"
Use the
backup profilecommand to specify the location for the backup file.hostname (config) # job <jobID> command <sequenceNumber> "backup profile <profile> to <backupLocation>"
To schedule the backup job to a local destination on the appliance:
hostname (config) # job <jobID> command <sequenceNumber> "backup profile <profile> to local"
To schedule the backup job on a remote server:
hostname (config) # job <jobID> command <sequenceNumber> "backup profile <profile> to <url>"
where
<url>is the specified remote location using the following format:scp://<username>:<password>@<hostname>/<remotePath>
To schedule the backup job to a USB drive on your local machine:
hostname (config) # job <jobID> command <sequenceNumber> "backup profile <profile> to usb"
Save your changes:
hostname (config) # write memory
Specify how often you want the backup job to run automatically.
To schedule daily, enter the end date, start date, or time:
hostname (config) # job <jobID> schedule daily end date <yyyy/mm/dd>
hostname (config) # job <jobID> schedule daily start date <yyyy/mm/dd>
hostname (config) # job <jobID> schedule daily time <hh:mm:ss>
The parameter values are as follows:
<yyyy/mm/dd>specifies the end or start date for the backup job.<hh:mm:ss>specifies the time to start the backup job based on a 24-hour clock.
To schedule monthly, enter:
hostname (config) # job <jobID> schedule monthly day-of-month <day>
where
<day>is the day of the month the backup should occur.To schedule once, enter:
hostname (config) # job <jobID> schedule once time <hh:mm:ss> date <yyyy/mm/dd>
The parameter values are as follows:
<hh:mm:ss>specifies the time to start the backup job based on a 24-hour clock.<yyyy/mm/dd>specifies the date to start the backup job.
To schedule a backup that runs periodically on a schedule you define, enter the end and start date or time interval:
hostname (config) # job <jobID> schedule periodic end date <yyyy/mm/dd> time <hh:mm:ss>
hostname (config) # job <jobID> schedule periodic start date <yyyy/mm/dd> time <hh:mm:ss>
hostname (config) # job <jobID> schedule periodic interval <timeInterval>
The parameter values are as follows:
<yyyy/mm/dd>specifies the end or start date for the backup job.<hh:mm:ss>specifies the end or start time for the backup job based on a 24-hour clock.<timeInterval>is specified in the format of "2h3m4s."
To schedule weekly:
hostname (config) # job <jobID> schedule <frequency> weekly day-of-week <day>
The
<day>parameter is the day of the week the backup job is scheduled to occur. Valid values aresun(Sunday),mon(Monday),tue(Tuesday),wed(Wednesday),thu(Thursday),fri(Friday), andsat(Saturday).To specify a type of schedule, enter:
hostname (config) # job <jobID> schedule <type>
where
<type>is the type of schedule for the backup job. Valid values are:Value
Description
onceThe backup runs only once
dailyThe backup runs daily
weeklyThe backup runs weekly
monthlyThe backup runs monthly
periodicThe backup runs automatically on a schedule you define
Enable the configuration for the scheduled backup job.
hostname (config) # job <jobID> enable
Note
To disable a job, use
no job <jobID> enable.Save your changes:
hostname (config) # write memory
Verify the status for the scheduled backup job. For example:
hostname (config) # show job Job 333: Status: pending Enabled: yes Continue on failure: no
Schedule type: daily Time and date: 2016/08/16 00:00:00 +0000
Last exec time: N/A Next exec time: Sun 2016/08/17 00:00:00 +0000 Commands: Command 1: backup profile config to local