Projet

Général

Profil

Sympa » Historique » Version 3

sacha, 23/06/2020 17:08

1 1 sacha
# Sympa
2 2 sacha
3
## DNS
4
5
penser pour les nouveaux site à mettre en entrée DNS:
6
7
```
8
listes.$domain CNAME listes.aquilenet.fr.
9
listes.$domain MX mail.aquilenet.fr.
10
11
```
12 3 sacha
13
## Script de migration de Kolter 
14
15
``` shell
16
17
18
#!/bin/sh
19
20
RSYNC_OPTS="-av --delete-after -e 'ssh -p 55555'"
21
22
echo "Stopping sympa"
23
24
systemctl stop sympa
25
26
echo "Syncing files..."
27
28
rsync -av --delete-after -e 'ssh -p 55555' 185.233.100.1:/var/lib/sympa/wwsarchive/ /var/lib/sympa/arc/
29
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/
30
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/
31
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/
32
33
rsync -av --delete-after -e 'ssh -p 55555' 185.233.100.1:/var/lib/sympa/bounce/ /var/lib/sympa/bounce/
34
35
sed -i -r 's/, attention, i/. I/' /var/lib/sympa/list_data/listes.aquilenet.fr/asso/config
36
37
#echo -n "Creating /etc/mail/sympa/aliases..."
38
#
39
#echo "## List aliases used for the sympa mailing-list manager" > /etc/mail/sympa/aliases
40
#
41
#egrep 'status.+open' /var/lib/sympa/list_data/*/*/config | \
42
#    cut -d '/' -f 6,7 | \
43
#    tr '/' ' ' | \
44
#    while read dom list ; do
45
#        echo -n "${list}@${dom} "
46
#        /usr/lib/sympa/bin/alias_manager.pl add "${list}" "${dom}"
47
#    done
48
#echo
49
#
50
#chmod 644 /etc/mail/sympa/aliases
51
#chown sympa:sympa /etc/mail/sympa/aliases
52
#newaliases
53
54
echo "Droping tables..."
55
56
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; ' \
57
    | mysql -u sympa --password="xx" sympa
58
59
echo "Restoring database..."
60
61
ssh -p 55555 185.233.100.1 "mysqldump -u sympa --password=zz sympa" | mysql -u sympa --password="yy" sympa
62
63
echo "6.1.23" > /etc/sympa/data_structure.version
64
65
echo "Upgrading Sympa internals (health check)"
66
su -l sympa -s /bin/sh -c "/usr/lib/sympa/bin/sympa.pl --health_check"
67
68
echo "Upgrading Sympa internals (upgrade)"
69
su -l sympa -s /bin/sh -c "/usr/lib/sympa/bin/sympa.pl --upgrade"
70
71
echo "Move messages stored in database to filesystem (if required)"
72
su -l sympa -s /bin/sh -c "/usr/share/sympa/bin/upgrade_bulk_spool.pl" || true
73
74
echo "Move messages sent through the web interface to the new formalism (if required)"
75
su -l sympa -s /bin/sh -c "/usr/share/sympa/bin/upgrade_send_spool.pl"
76
77
echo "Version"
78
cat /etc/sympa/data_structure.version
79
80
echo "Re-Starting sympa"
81
82
systemctl restart sympa
83
84
echo "Re-Starting sympa WWS"
85
86
systemctl restart wwsympa
87
88
exit 0
89
```