Be smart. Think open source.

SUSE Manager 3 Hands-on

Hands-on :: Backup 06

Configure a scheduled backup and perform a restore.

Backup 06 - Database

Create a backup directory:


# mkdir /var/spacewalk/db-backup

# chown postgres:postgres /var/spacewalk/db-backup

# chmod 700 /var/spacewalk/db-backup

Backup 06 - Database

Create a backup for the first time:


# smdba backup-hot --enable=on --backup-dir=/var/spacewalk/db-backup

Backup 06 - Database

Create a cron job for scheduled backups.

Add the following line to the cron job at /etc/cron.d/db-backup-mgr:


0 2 * * * root /usr/bin/smdba backup-hot --enable=on --backup-dir=/var/spacewalk/db-backup

Backup 06 - Database

Perform a restore.

Stop spacewalk servies:


# spacewalk-service stop

Stop the database:


# smdba db-stop

Backup 06 - Database

Start the restore process:


# smdba backup-restore start

Backup 06 - Database

Start spacewalk servies:


# spacewalk-service start

Feel Free to Contact Us

www.adfinis-sygroup.ch

Tech Blog

GitHub

info@adfinis-sygroup.ch

Twitter