pro[zind]

Sauvegarde d'une instance OwnCloud

dans Bloc-notes

/!\ Vieilles notes probablement obsolètes /!\

Preventif

Backup /data & /config

rsync -e "ssh -p 22" -arzv --stats --delete-after -f"- thumbnails/" host:/path/to/owncloud/data /path/to/backup/owncloud/

rsync -e "ssh -p 22" -arzv host:/path/to/owncloud/config /path/to/backup/owncloud/

Backup DB

mysqldump --lock-tables -h [server] -u [username] -p[password] [db_name] > owncloud-dbbackup_`date +"%Y%m%d"`.bak

Curatif

Restore /data & config

rsync -e "ssh -p 42" -arzv --stats -f"- thumbnails/" host:/path/to/backuup/owncloud/data/ /home/owncloud/data

Restore DB

Créer le nouvel user et sa base:

CREATE USER 'owncloud'@'localhost' IDENTIFIED BY 'password'
CREATE DATABASE IF NOT EXISTS owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'password';

Déménagement SSL

MàJ DNS

10800 IN A [new.IP]
@ 10800 IN A [new.IP]
imap 10800 IN CNAME access.mail.gandi.net.
pop 10800 IN CNAME access.mail.gandi.net.
smtp 10800 IN CNAME relay.mail.gandi.net.
webmail 10800 IN CNAME agent.mail.gandi.net.
@ 10800 IN MX 50 fb.mail.gandi.net.
@ 10800 IN MX 10 spool.mail.gandi.net.

Surprises

Changement de Debian/Wheezy -> Debian/Jessie

Apache2: v2.2 -> v2.4

site-avaiable

Les noms des fichiers se terminent par .conf

PhpMyAdmin

Erreur: Fatal error: require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 463

Remède: Ajout de /usr/share/php/php-gettext/ dans la directive php_admin_value open_basedir du fichier de conf apache. (Ref. : phpmyadmin symlinks error after ubuntu upgrade - superuser.com)

Owncloud logging

(Re)mettre en place les logs dans /var/log/owncloud/ et le logrotate

Manipulation des données ownCloud en local via CLI

Mise en place de davfs2 pour le montage via fstab. Attention doc.owncloud est incomplète, voir aussi la doc.ubuntu

erreur: /sbin/mount.davfs: warning: the server does not support locks

/etc/fstab

~/.davfs2/secrets

/etc/davfs2/cert

/etc/davfs2/davfs2.conf

Ressources: