DS Backup Scheduling
To schedule DS backups:
-
Make sure that you’ve set up cloud storage for your cloud provider platform:
-
Make sure that you’ve implemented cloud secret management. DS instances on which you restore data must have the same master key as DS instances on which you perform backups. If you don’t share the master key, you won’t be able to restore from your backups.
-
Decide whether you would prefer to use the default backup schedule or a customized backup schedule.
-
Schedule backups:
-
If you want to use the default backup schedule, run the schedule-backups.sh script as described in Default Backup Schedule.
-
If you want to use a customized backup schedule, edit files, and then run the schedule-backups.sh script as described in Customized Backup Schedule.
-
Default Backup Schedule
The default backup schedule creates incremental backups of the idrepo
instance at the beginning of every hour, and the cts
instance at 10 minutes
past every hour.
Run the schedule-backups.sh script to start backing up cts
and
idrepo
instances using the default schedule:
$ /path/to/forgeops/bin/schedule-backups.sh my-namespace
In the CDM deployment, DS is deployed to the prod namespace. So you would specify prod as the namespace in the above command. If you have deployed DS in another namespace, you must specify the corresponding namespace.
Customized Backup Schedule
You can customize the backup schedule for cts
and idrepo
instances
separately. You can also schedule backups from any DS pod.
For example, suppose you wanted to make these customizations to the default backup schedule:
-
Back up the
ds-idrepo-1
directory instance (instead of theds-idrepo-0
instance). -
Back up the
idrepo
directory at the start of every hour, and at the thirtieth minute of every hour (instead of once an hour at the start of the hour). -
Back up the
cts
directory at 20 minutes after the hour (instead of at 10 minutes after the hour).
To customize the schedules for the idrepo
and cts
instances, and to
schedule backups from the ds-idrepo-1
pod instead of the ds-idrepo-0
pod:
-
Revise the set of instances to be backed up in the configuration of the running CDM instance:
-
Get the
platform-config
configmap:$ kubectl get configmap platform-config --output yaml > my-config.yaml
-
In the output file from the preceding step, set the
DSBACKUP_HOSTS
parameter to the revised set of instances to be backed up:For example:
DSBACKUP_HOSTS
"ds-idrepo-1,ds-cts-0" -
Apply the change to the running CDM:
$ kubectl apply --filename my-config.yaml
-
-
Apply the same change to your local Kustomization overlay file to ensure that the set of backup instances is configured correctly the next time you deploy the CDM:
-
Change to the /path/to/forgeops/kustomize/base/kustomizeConfig directory.
-
Edit the kustomization.yaml file and set the
DSBACKUP_HOSTS
parameter to the revised set of backup instances.For example:
DSBACKUP_HOSTS
"ds-idrepo-1,ds-cts-0"
-
-
Restart the pods that perform backups, so that DS can obtain the revised set of backup instances:
$ kubectl delete pods ds-idrepo-1 $ kubectl delete pods ds-cts-0
-
Change the frequency of
idrepo
backups and the starting time ofcts
backups:-
Open the /path/to/forgeops/bin/schedule-backups.sh script.
-
To back up the
idrepo
directory at the start of every hour, and at the thirtieth minute of every hour, change the line:BACKUP_SCHEDULE_IDREPO="0 * * * *"
to:
BACKUP_SCHEDULE_IDREPO="*/30 * * * *"
-
To back up the
cts
directory at 20 minutes after the hour, change the line:BACKUP_SCHEDULE_CTS="10 * * * *"
to:
BACKUP_SCHEDULE_CTS="20 * * * *"
-
Save your changes.
-
-
Run the schedule-backups.sh script.
$ /path/to/forgeops/bin/schedule-backups.sh prod
The schedule-backups.sh script stops any previously scheduled backup jobs before initiating the new schedule.