Spostati nella directory dove conserverai i file di backup (esempio):
mkdir -p /home/xxx/roundcube.bak
cd /home/xxx/roundcube.bak
BACKUP (pre-apt upgrade)
1.1 Backup configurazione Roundcubetar czf etc-roundcube.tar.gz /etc/roundcube
1.2 Backup file Roundcube (plugin/skin/log/temp)
tar czf varlib-roundcube.tar.gz /var/lib/roundcube
1.3 Backup database Roundcube (MySQL/MariaDB)
mysqldump --single-transaction --quick --routines --triggers roundcube > roundcube.sql
gzip -f roundcube.sql
1.4 Backup vhost Apache (sites-available)
tar czf apache-sites.tar.gz /etc/apache2/sites-available
1.5 (Opzionale) Stato pacchetti Roundcube
dpkg -l | grep roundcube > roundcube-packages.txt
1.6 Verifica presenza file di backup
ls -lh
ROLLBACK (solo se necessario)
2.1 Stop Apachesystemctl stop apache2
2.2 Ripristino configurazione Roundcube
tar xzf etc-roundcube.tar.gz -C /
2.3 Ripristino file Roundcube
tar xzf varlib-roundcube.tar.gz -C /
2.4 Ripristino vhost Apache
tar xzf apache-sites.tar.gz -C /
2.5 Ripristino database Roundcube
gunzip -c roundcube.sql.gz | mysql roundcube
2.6 Avvio Apache
systemctl start apache2
2.7 Check log Roundcube (post-rollback)
tail -n 50 /var/lib/roundcube/logs/errors.log