linux_wiki:freeipa_backup_ipa_data

This is an old revision of the document!


FreeIPA Backup IPA Data

General Information

Run this script periodically via cron to create data only online local backups of the IPA database. Will also cleanup older backups.

Checklist


The Script

Run this script periodically via cron.

#!/bin/bash
# Name: cron_backup-ipa-data.sh
# Description: Meant to be executed via cron: Backup IPA data
# Last Updated: 2016-10-07
# Recent Changes:-initial release
################################################################
 
#=========================
#### Main Starts Here ####
#=========================
 
echo -e "\n>> Backing up IPA data only in online mode..."
# Perform an online, data only backup
/usr/sbin/ipa-backup --data --online
 
# Cleanup => Find directories older than 7 days and remove them
echo -e "\n>> Cleaning up directories older than 7 days..."
find /var/lib/ipa/backup/ -type d -mtime +7 -print0 | xargs -0 /usr/bin/rm -vrf
 
echo -e "\n>> Backup completed."

  • linux_wiki/freeipa_backup_ipa_data.1480219919.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)