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
- Distro(s): Enterprise Linux 6/7
- Other: FreeIPA Server Installed (script runs there)
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."