Actions
Sympa¶
DNS¶
penser pour les nouveaux site à mettre en entrée DNS:
listes.$domain CNAME listes.aquilenet.fr.
Script de migration de Kolter¶
#!/bin/sh
RSYNC_OPTS="-av --delete-after -e 'ssh -p 55555'"
echo "Stopping sympa"
systemctl stop sympa
echo "Syncing files..."
rsync -av --delete-after -e 'ssh -p 55555' 185.233.100.1:/var/lib/sympa/wwsarchive/ /var/lib/sympa/arc/
rsync -av --delete-after -e 'ssh -p 55555' 185.233.100.1:/var/lib/sympa/expl/listes.aquilenet.fr/ /var/lib/sympa/list_data/listes.aquilenet.fr/
rsync -av --delete-after -e 'ssh -p 55555' 185.233.100.1:/var/lib/sympa/expl/listes.girondix.net/ /var/lib/sympa/list_data/listes.girondix.net/
rsync -av --delete-after -e 'ssh -p 55555' 185.233.100.1:/var/lib/sympa/expl/listes.ressourceries.org/ /var/lib/sympa/list_data/listes.ressourceries.org/
rsync -av --delete-after -e 'ssh -p 55555' 185.233.100.1:/var/lib/sympa/bounce/ /var/lib/sympa/bounce/
sed -i -r 's/, attention, i/. I/' /var/lib/sympa/list_data/listes.aquilenet.fr/asso/config
#echo -n "Creating /etc/mail/sympa/aliases..."
#
#echo "## List aliases used for the sympa mailing-list manager" > /etc/mail/sympa/aliases
#
#egrep 'status.+open' /var/lib/sympa/list_data/*/*/config | \
# cut -d '/' -f 6,7 | \
# tr '/' ' ' | \
# while read dom list ; do
# echo -n "${list}@${dom} "
# /usr/lib/sympa/bin/alias_manager.pl add "${list}" "${dom}"
# done
#echo
#
#chmod 644 /etc/mail/sympa/aliases
#chown sympa:sympa /etc/mail/sympa/aliases
#newaliases
echo "Droping tables..."
echo 'DROP TABLE IF EXISTS admin_table, bulkmailer_table, bulkspool_table, conf_table, exclusion_table, inclusion_table, list_table, logs_table, netidmap_table, notification_table, one_time_ticket_table, session_table, stat_counter_table, stat_table, subscriber_table, user_table; ' \
| mysql -u sympa --password="xx" sympa
echo "Restoring database..."
ssh -p 55555 185.233.100.1 "mysqldump -u sympa --password=zz sympa" | mysql -u sympa --password="yy" sympa
echo "6.1.23" > /etc/sympa/data_structure.version
echo "Upgrading Sympa internals (health check)"
su -l sympa -s /bin/sh -c "/usr/lib/sympa/bin/sympa.pl --health_check"
echo "Upgrading Sympa internals (upgrade)"
su -l sympa -s /bin/sh -c "/usr/lib/sympa/bin/sympa.pl --upgrade"
echo "Move messages stored in database to filesystem (if required)"
su -l sympa -s /bin/sh -c "/usr/share/sympa/bin/upgrade_bulk_spool.pl" || true
echo "Move messages sent through the web interface to the new formalism (if required)"
su -l sympa -s /bin/sh -c "/usr/share/sympa/bin/upgrade_send_spool.pl"
echo "Version"
cat /etc/sympa/data_structure.version
echo "Re-Starting sympa"
systemctl restart sympa
echo "Re-Starting sympa WWS"
systemctl restart wwsympa
exit 0
Updated by youpi over 4 years ago · 4 revisions