Projet

Général

Profil

Sympa » Historique » Version 4

youpi, 23/06/2020 23:53

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