FDS backup_now script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is small backup script I wrote. Often times before minor changes I run
a quick backup to be on the safe side.

It assumes an ldap instance is the same as your hostname.

bob.test.test.com
instance name=bob


#!/bin/sh
# Edward Guy Capriolo
# 2007 February 13
# Used to initiate a databackup of LDAP

#Start user edit
auth_dn="change_this"
auth_ps="change_this"
#End user edit

USER_ID=`id -u`
host_n=`hostname -s`
# Standard format 2007_02_11_02_02_01
folder_name=`date +%Y_%m_%d_%H_%M_%S`

if [ "$USER_ID" = "0" ]; then
        true
else
        echo "Script must be run as root (0)"
        exit 1
fi

/opt/fedora-ds/slapd-${host_n}/db2bak.pl -D "${auth_dn}" -w "${auth_ps}" -a
/opt/fedora-ds/slapd-${host_n}/bak/${folder_name}
echo "Backup Initiated: Run tail -f
/opt/fedora-ds/slapd-${host_n}/logs/errors to monitor the backup status."
exit 0

Hope this is useful.
Edward Capriolo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/389-users/attachments/20070213/efd59eef/attachment.html 


[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux