]> arthur.barton.de Git - servertools.macosx.git/blob - odbackup/odbackup
Initial GIT import including odbackup script
[servertools.macosx.git] / odbackup / odbackup
1 #!/usr/bin/expect -f
2 #
3 # Backup OpenDirectory, including LDAP database and Kerberos configuration
4 # Copyright (c)2010 Barton IT-Consulting & maccc
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE.
13 # See the GNU General Public License for more details.
14 #
15
16 set date [timestamp -format "%Y-%m-%d"]
17 set archive_password "apple"
18 set archive_name "OD-"
19
20 spawn /usr/sbin/slapconfig -backupdb $archive_name$date
21 expect "Enter archive password"
22 send "$archive_password\r"
23 expect eof