echo Backup from / to sdb5 echo "strg-C to stop" sleep 10 mount /mnt/sdb5 time rsync -avv --delete --force --exclude='/skole/backup/' --exclude='/mnt/' --exclude='/proc/' / /mnt/sdb5Datenbanken erfordern eine Sonderbehandlung, z.B. die LDAP Datenbank auf dem Hauptserver "tjener" hier ein Vorschlag von C14r aus CipUX/Installation:
We look if the ldap server is started:
(14)
# ps ax | grep slapd | grep -v grep
This should produce output like:
(15)
2890 ? Ss 0:00 /usr/sbin/slapd -h ldap:/// ldaps:///
This means the ldap server is running. So we stop it with:
(16)
# /etc/init.d/slapd stop
We have to be sure that the ldap server is stopped. So if
we execute (14) again it should not generate any output.
Then we make a temporary backup, which may only be used for
this ldap version. We execute the archive program:
(17)
# tar cvjf /skole/backup/tmp_backup_ldap.tar.bz2 /var/lib/ldap
If you want to restore your ldap data later, you may write the
backup back (when the ldap server is NOT running!) with:
(18)
# rm -r /var/lib/ldap
# cd /
# tar xvjf /skole/backup/tmp_backup_ldap.tar.bz2
Es gibt aber auch noch andere Wege, z.B.: slapcat & slapadd Backup mit slapcat: linux ~# slapcat -l backup.ldif Analog erfolgt die Wiederherstellung: linux ~# slapadd -l backup.ldif Oder ldapsearch (zum Sichern) und ldapadd (zum Wiederherstellen der Daten). linux ~# ldapsearch <...> -b dc=mydomain,dc=de -s sub "*" "*" > backup.ldif linux ~# ldapadd <...> < backup.ldif Quelle: http://www.rrze.uni-erlangen.de/dienste/arbeiten-rechnen/linux/howtos/ldap/backup.shtml Weitere Tipps
- Remote-Verzeichnisse via ssh mounten mit lufs / shfs