1-general-prerequisites-before-upgrade.sh
· 136 B · Bash
Raw
systemctl disable zammad --now
apt-mark hold zammad
apt update
apt upgrade
# Continue with step 2 or 3 depending on your current state
1 | systemctl disable zammad --now |
2 | apt-mark hold zammad |
3 | apt update |
4 | apt upgrade |
5 | |
6 | # Continue with step 2 or 3 depending on your current state |
7 |
2-debian-10-to-11-repositories.sh
· 533 B · Bash
Raw
sed -i 's/security\.debian\.org buster\/updates/security\.debian\.org bullseye-security/g' /etc/apt/sources.list
sed -i 's/debian-security buster\/updates/ bullseye-security/g' /etc/apt/sources.list
sed -i 's/buster/bullseye/g' /etc/apt/sources.list
sed -i 's/debian 10/debian 11/g' /etc/apt/sources.list.d/zammad.list
apt clean; apt update
apt upgrade
apt dist-upgrade
pg_dropcluster --stop 13 main
pg_upgradecluster 11 main /var/lib/postgresql/13/main/
apt autoremove
apt purge postgresql-11 postgresql-client-11
shutdown -r now
1 | sed -i 's/security\.debian\.org buster\/updates/security\.debian\.org bullseye-security/g' /etc/apt/sources.list |
2 | sed -i 's/debian-security buster\/updates/ bullseye-security/g' /etc/apt/sources.list |
3 | sed -i 's/buster/bullseye/g' /etc/apt/sources.list |
4 | sed -i 's/debian 10/debian 11/g' /etc/apt/sources.list.d/zammad.list |
5 | apt clean; apt update |
6 | apt upgrade |
7 | apt dist-upgrade |
8 | |
9 | pg_dropcluster --stop 13 main |
10 | pg_upgradecluster 11 main /var/lib/postgresql/13/main/ |
11 | |
12 | apt autoremove |
13 | apt purge postgresql-11 postgresql-client-11 |
14 | shutdown -r now |
15 |
2-ubuntu-18-to-20-repositories.sh
· 331 B · Bash
Raw
sed -i 's/bionic/focal/g' /etc/apt/sources.list
sed -i 's/ubuntu 18/ubuntu 20/g' /etc/apt/sources.list.d/zammad.list
apt clean; apt update
apt upgrade
apt dist-upgrade
pg_dropcluster --stop 12 main
pg_upgradecluster 10 main /var/lib/postgresql/12/main/
apt autoremove
apt purge postgresql-10 postgresql-client-10
shutdown -r now
1 | sed -i 's/bionic/focal/g' /etc/apt/sources.list |
2 | sed -i 's/ubuntu 18/ubuntu 20/g' /etc/apt/sources.list.d/zammad.list |
3 | apt clean; apt update |
4 | apt upgrade |
5 | apt dist-upgrade |
6 | |
7 | pg_dropcluster --stop 12 main |
8 | pg_upgradecluster 10 main /var/lib/postgresql/12/main/ |
9 | |
10 | apt autoremove |
11 | apt purge postgresql-10 postgresql-client-10 |
12 | shutdown -r now |
13 |
3-debian-11-to-12-repositories.sh
· 336 B · Bash
Raw
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sed -i 's/debian 11/debian 12/g' /etc/apt/sources.list.d/zammad.list
apt clean; apt update
apt upgrade
apt dist-upgrade
pg_dropcluster --stop 15 main
pg_upgradecluster 13 main /var/lib/postgresql/15/main/
apt autoremove
apt purge postgresql-13 postgresql-client-13
shutdown -r now
1 | sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list |
2 | sed -i 's/debian 11/debian 12/g' /etc/apt/sources.list.d/zammad.list |
3 | apt clean; apt update |
4 | apt upgrade |
5 | apt dist-upgrade |
6 | |
7 | pg_dropcluster --stop 15 main |
8 | pg_upgradecluster 13 main /var/lib/postgresql/15/main/ |
9 | |
10 | apt autoremove |
11 | apt purge postgresql-13 postgresql-client-13 |
12 | shutdown -r now |
13 |
3-ubuntu-20-to-22-repositories.sh
· 330 B · Bash
Raw
sed -i 's/focal/jammy/g' /etc/apt/sources.list
sed -i 's/ubuntu 20/ubuntu 22/g' /etc/apt/sources.list.d/zammad.list
apt clean; apt update
apt upgrade
apt dist-upgrade
pg_dropcluster --stop 14 main
pg_upgradecluster 12 main /var/lib/postgresql/14/main/
apt autoremove
apt purge postgresql-12 postgresql-client-12
shutdown -r now
1 | sed -i 's/focal/jammy/g' /etc/apt/sources.list |
2 | sed -i 's/ubuntu 20/ubuntu 22/g' /etc/apt/sources.list.d/zammad.list |
3 | apt clean; apt update |
4 | apt upgrade |
5 | apt dist-upgrade |
6 | |
7 | pg_dropcluster --stop 14 main |
8 | pg_upgradecluster 12 main /var/lib/postgresql/14/main/ |
9 | |
10 | apt autoremove |
11 | apt purge postgresql-12 postgresql-client-12 |
12 | shutdown -r now |
13 |
4-ubuntu-22-to-24-repositories.sh
· 330 B · Bash
Raw
sed -i 's/jammy/noble/g' /etc/apt/sources.list
sed -i 's/ubuntu 22/ubuntu 24/g' /etc/apt/sources.list.d/zammad.list
apt clean; apt update
apt upgrade
apt dist-upgrade
pg_dropcluster --stop 16 main
pg_upgradecluster 14 main /var/lib/postgresql/16/main/
apt autoremove
apt purge postgresql-14 postgresql-client-14
shutdown -r now
1 | sed -i 's/jammy/noble/g' /etc/apt/sources.list |
2 | sed -i 's/ubuntu 22/ubuntu 24/g' /etc/apt/sources.list.d/zammad.list |
3 | apt clean; apt update |
4 | apt upgrade |
5 | apt dist-upgrade |
6 | |
7 | pg_dropcluster --stop 16 main |
8 | pg_upgradecluster 14 main /var/lib/postgresql/16/main/ |
9 | |
10 | apt autoremove |
11 | apt purge postgresql-14 postgresql-client-14 |
12 | shutdown -r now |
13 |
5-finish-upgrade.sh
· 77 B · Bash
Raw
apt-mark unhold zammad
systemctl enable zammad
apt update
apt install zammad
1 | apt-mark unhold zammad |
2 | systemctl enable zammad |
3 | apt update |
4 | apt install zammad |
5 |
pro-tip-huge-instance.sh
· 274 B · Bash
Raw
# The following action is NOT reversible but is significantly faster.
# Use at own descression - replace oldversion with your old version and newversion with your new version
pg_upgradecluster --method=upgrade --link <oldversion> main /var/lib/postgresql/<newversion>/main/
1 | # The following action is NOT reversible but is significantly faster. |
2 | # Use at own descression - replace oldversion with your old version and newversion with your new version |
3 | |
4 | pg_upgradecluster --method=upgrade --link <oldversion> main /var/lib/postgresql/<newversion>/main/ |