penser pour les nouveaux site à mettre en entrée DNS:

listes.$domain CNAME

Script de migration de Kolter


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' /var/lib/sympa/arc/
rsync -av --delete-after -e 'ssh -p 55555' /var/lib/sympa/list_data/
rsync -av --delete-after -e 'ssh -p 55555' /var/lib/sympa/list_data/
rsync -av --delete-after -e 'ssh -p 55555' /var/lib/sympa/list_data/

rsync -av --delete-after -e 'ssh -p 55555' /var/lib/sympa/bounce/

sed -i -r 's/, attention, i/. I/' /var/lib/sympa/list_data/

#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/ add "${list}" "${dom}"
#    done
#chmod 644 /etc/mail/sympa/aliases
#chown sympa:sympa /etc/mail/sympa/aliases

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 "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/ --health_check"

echo "Upgrading Sympa internals (upgrade)"
su -l sympa -s /bin/sh -c "/usr/lib/sympa/bin/ --upgrade"

echo "Move messages stored in database to filesystem (if required)"
su -l sympa -s /bin/sh -c "/usr/share/sympa/bin/" || 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/"

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 10 months ago · 4 revisions