Prise de notes pour la redaction :
Une migration SME est toujours unique, en fonction du serveur visé, mais voici les étapes pour une sauvegarde pour un serveur classique simple :
Voici un script réunissant l’ensemble des datas à sauvegarder à copier/coller directement :
cd /root cat <<'EOF' > dir.list /etc/e-smith/templates-custom /etc/e-smith/templates-user-custom /etc/group /etc/gshadow /etc/passwd /etc/samba/secrets.tdb /etc/samba/smbpasswd /etc/shadow /etc/smbpasswd /etc/ssh /etc/sudoers /root /home/e-smith/Maildir /home/e-smith/home /home/e-smith/ssl.crt /home/e-smith/ssl.key /home/e-smith/db /var/lib/dhcpd/dhcpd.leases /var/log/qpsmtpd /var/log/sqpsmtpd /var/log/qmail /var/log/smb_audit.* /var/log/httpd/ /var/log/dovecot/ /var/log/squid EOF find /usr/local/bin/ -type f | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list" find /etc/cron.* -type f | xargs -I % sh -c "rpm -qf % 2>&1 > /dev/null || echo % >> dir.list" rpm -q smeserver-dovecot 2>&1 && cat <<'EOF' >> dir.list /etc/dovecot/sharemailbox/ EOF rpm -q phpki >/dev/null 2>&1 && cat <<'EOF' >> dir.list /opt/phpki/phpki-store/ /opt/phpki/html/config.php EOF rpm -q smeserver-openvpn-bridge >/dev/null 2>&1 && cat <<'EOF' >> dir.list /etc/openvpn/bridge/priv /etc/openvpn/bridge/pub /var/log/openvpn-bridge EOF rpm -q smeserver-openvpn-s2s >/dev/null 2>&1 && cat <<'EOF' >> dir.list /etc/openvpn/s2s/priv /etc/openvpn/s2s/pub /var/log/openvpn-s2s EOF rpm -q smeserver-openvpn-routed >/dev/null 2>&1 && cat <<'EOF' >> dir.list /etc/openvpn/routed/priv /etc/openvpn/routed/pub /var/log/openvpn-routed EOF rpm -q pydio >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/pydio/files /var/lib/pydio/personal /var/lib/pydio/public /var/log/pydio EOF rpm -q dokuwiki >/dev/null 2>&1 && cat <<'EOF' >> dir.list /etc/dokuwiki/acl.auth.php /etc/dokuwiki/acronyms.conf /etc/dokuwiki/entities.conf /etc/dokuwiki/interwiki.conf /etc/dokuwiki/local.php /etc/dokuwiki/plugins.local.php /etc/dokuwiki/scheme.conf /var/lib/dokuwiki/data/attic /var/lib/dokuwiki/data/index /var/lib/dokuwiki/data/media /var/lib/dokuwiki/data/media_attic /var/lib/dokuwiki/data/media_meta /var/lib/dokuwiki/data/meta /var/lib/dokuwiki/data/pages EOF for D in /usr/share/dokuwiki/lib/plugins/*;do rpm -qf $D >/dev/null 2>&1 || echo $D >> dir.list done rpm -q smeserver-lemonldap-ng >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/lemonldap-ng/conf /var/lib/lemonldap-ng/notifications EOF rpm -q smeserver-jappix >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/jappix/ /var/log/jappix EOF rpm -q smeserver-dl >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/dl/ EOF rpm -q awstats >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/awstats EOF rpm -q smeserver-limesurvey >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/limesurvey/uploads EOF rpm -q smeserver-mailman >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/mailman/ /usr/lib/mailman/aliases/ EOF rpm -q ipasserelle-listes >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/mailman/ /usr/lib/mailman/aliases/ EOF rpm -q smeserver-ntop >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/ntop/ EOF rpm -q ipasserelle-im >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/lib/ejabberd/ /var/log/ejabberd.run EOF [ -e /var/lib/phone ] && cat <<'EOF' >> dir.list /var/lib/phone EOF rpm -q smeserver-freepbx >/dev/null 2>&1 && cat <<'EOF' >> dir.list /opt/freepbx /var/lib/asterisk/ /etc/asterisk /var/spool/asterisk/ /var/log/asterisk EOF rpm -q smeserver-webfilter >/dev/null 2>&1 && cat <<'EOF' >> dir.list /var/squidGuard/blacklists/ EOF rpm -q smeserver-grr >/dev/null 2>&1 && cat <<'EOF' >> dir.list /usr/share/grr/images/ EOF if [ -d /usr/share/mozilla-mcd/ ]; then for F in /usr/share/mozilla-mcd/*;do rpm -qf $F >/dev/null 2>&1 || echo $F >> dir.list done fi
Une fois terminé, le fichier dir.list généré contient l'ensemble des path à sauvegarder. Il ne reste plus qu'à générer l'archive.
Avant de commencer, nous allons procéder à l'arrêt de tous les services :
sv d /service/qmail sv d /service/qpsmtpd sv d /service/sqpsmtpd sv d /service/ejabberd sv d /service/smbd sv d /service/httpd-e-smith
Génération des dump SQL en l'état :
signal-event pre-backup
Création de l'archive :
tar cvzf ~fws/smeserver.tgz -T dir.list --xattrs
Le fichier de sauvegarde smeserver.tgz est prêt.
/home/e-smith
ou /home/e-smith/files
.