Version française plus bas.
Currently my Yunohost is running on a Vorke V1 with 8Go RAM, and a 512Go hard drive.
However I want to virtualize my yunohost server, and run it on my ProxMox cluster.
So I created a VM, with 4Go RAM, and 650GB of disk space.
On the vorke V1, i mounted the VM drive using SSHFS, and then made a complete backup using the commands:
- sshfs root@192.168.111.8:/home/yunohost.backup /home/yunohost.backup.nfs/
- yunohost backup create -n test-20180721 -d “My comment” -o /home/yunohost.backup.nfs/
This backup ended successfully.
On the VM, I installed Debian 9.5 distrib, then installed Yunohost, and tried to restore the complete configuration using these simple commands:
- mkdir /home/yunohost.backup/archives
- mv /home/yunohost.backup/test-20180721.tar.gz /home/yunohost.backup/archives
- yunohost backup restore test-20180721
After few hours, I received the following message:
Traceback (most recent call last):
File “/usr/bin/yunohost”, line 213, in
timeout=opts.timeout,
File “/usr/lib/python2.7/dist-packages/moulinette/init.py”, line 136, in cli
moulinette.run(args, output_as=output_as, password=password, timeout=timeout)
File “/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py”, line 390, in run
ret = self.actionsmap.process(args, timeout=timeout)
File “/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py”, line 498, in process
return func(**arguments)
File “/usr/lib/moulinette/yunohost/backup.py”, line 2122, in backup_restore
restore_manager.mount()
File “/usr/lib/moulinette/yunohost/backup.py”, line 1025, in mount
self.method.mount(self)
File “/usr/lib/moulinette/yunohost/backup.py”, line 1868, in mount
tar.extractall(members=subdir_and_files, path=self.work_dir)
File “/usr/lib/python2.7/tarfile.py”, line 2081, in extractall
self.extract(tarinfo, path)
File “/usr/lib/python2.7/tarfile.py”, line 2118, in extract
self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
File “/usr/lib/python2.7/tarfile.py”, line 2211, in _extract_member
self.utime(tarinfo, targetpath)
File “/usr/lib/python2.7/tarfile.py”, line 2332, in utime
os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))
OverflowError: Python int too large to convert to C long
It seems that the script created a new directory /home/yunohost.backup/tmp. This directory now contains 208GB of datas.
However, my server is still not restored and functionnal.
What can I do to restore my configuration on my VM using the “yunohost backup”/“yunohost restore” process ?
The applications installed are:
- Nextcloud
- Rainloop
- OpenSondage
- Shell in a box
- PhpMyAdmin
No custom configuration done.
My YunoHost configuration
Internet access: Fiber 1GB
YunoHost version:
yunohost: latest version
yunohost-admin: latest version
moulinette: latest version
ssowat: latest version
Here’s the result of ‘df -h’:
/dev/mapper/VM–LCDR–NEW–vg-root 5,7G 2,2G 3,2G 40% /
/dev/sda1 236M 63M 162M 28% /boot
/dev/mapper/DATAS-HOME 536G 453G 57G 89% /home
and a ‘ls -thl’ in /home/yunohost.backup/archives,
root@VM-LCDR-NEW:/home/yunohost.backup/archives# ls -htl
total 246G
-rw-r–r-- 1 root root 246G juil. 21 19:29 test-20180721.tar.gz
-rw-r–r-- 1 root root 2,2K juil. 21 11:16 test-20180721.info.json
{
“host”: “Debian 9.5”,
“kernel”: “4.9.0-7-amd64”,
“packages”: {
“yunohost”: {
“repo”: “stable”,
“version”: “3.0.0.1”
},
“yunohost-admin”: {
“repo”: “stable”,
“version”: “3.0.0”
},
“moulinette”: {
“repo”: “stable”,
“version”: “3.0.0”
},
“ssowat”: {
“repo”: “stable”,
“version”: “3.0.0”
}
},
“backports”: [],
“system”: {},
“nginx”: [
“nginx: the configuration file /etc/nginx/nginx.conf syntax is ok”,
“nginx: configuration file /etc/nginx/nginx.conf test is successful”
],
“services”: {
“glances”: “exited (enabled)”,
“nslcd”: “running (enabled)”,
“metronome”: “running (enabled)”,
“postfix”: “exited (enabled)”,
“rspamd”: “running (enabled)”,
“yunohost-firewall”: “exited (enabled)”,
“dovecot”: “running (enabled)”,
“nginx”: “running (enabled)”,
“php7.0-fpm”: “running (enabled)”,
“dnsmasq”: “running (enabled)”,
“fail2ban”: “running (enabled)”,
“yunohost-api”: “running (enabled)”,
“mysql”: “running (enabled)”,
“avahi-daemon”: “running (enabled)”,
“shellinabox”: “running (enabled)”,
“redis-server”: “running (enabled)”,
“slapd”: “running (enabled)”,
“ssh”: “running (enabled)”
},
“applications”: {
“phpmyadmin”: “phpMyAdmin”,
“opensondage”: “OpenSondage”,
“rainloop”: “Rainloop”,
“shellinabox”: “Shell In A Box”,
“nextcloud”: “Nextcloud”
},
“security”: {
“CVE-2017-5754”: {
“name”: “meltdown”,
“vulnerable”: false
}
}
}
Actuellement, mon serveur fonctionne sur une machine Vorke V1 avec 8Go de disque, et un disque de 500Go.
Il me faut virtualiser cette fonfiguration.
J’ai construis une VM sur mon cluster ProxMox. Cette VM a 4Go RAM, et 650Go disque.
J’ai effectuée une sauvegarde de mon serveur directement sur ma VM via un montage SSFS.
Une fois la sauvegarde terminée, j’ai lancé la restoration de la config sur ma VM avec les commandes:
- mkdir /home/yunohost.backup/archives
- mv /home/yunohost.backup/test-20180721.tar.gz /home/yunohost.backup/archives
- yunohost backup restore test-20180721
Au bout de quelques heures, j’obtiens le message ci-dessous:
Traceback (most recent call last):
File “/usr/bin/yunohost”, line 213, in
timeout=opts.timeout,
File “/usr/lib/python2.7/dist-packages/moulinette/init.py”, line 136, in cli
moulinette.run(args, output_as=output_as, password=password, timeout=timeout)
File “/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py”, line 390, in run
ret = self.actionsmap.process(args, timeout=timeout)
File “/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py”, line 498, in process
return func(**arguments)
File “/usr/lib/moulinette/yunohost/backup.py”, line 2122, in backup_restore
restore_manager.mount()
File “/usr/lib/moulinette/yunohost/backup.py”, line 1025, in mount
self.method.mount(self)
File “/usr/lib/moulinette/yunohost/backup.py”, line 1868, in mount
tar.extractall(members=subdir_and_files, path=self.work_dir)
File “/usr/lib/python2.7/tarfile.py”, line 2081, in extractall
self.extract(tarinfo, path)
File “/usr/lib/python2.7/tarfile.py”, line 2118, in extract
self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
File “/usr/lib/python2.7/tarfile.py”, line 2211, in _extract_member
self.utime(tarinfo, targetpath)
File “/usr/lib/python2.7/tarfile.py”, line 2332, in utime
os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))
OverflowError: Python int too large to convert to C long
Le script a créé le répertoire /home/yunohost.backup/tmp, qui contient 208Go de données.
Mais, mon serveur est loin d’être fonctionnel
Que puis-je faire pour migrer mon serveur de la machine actuelle vers ma VM en utilisant la technique du “yunohost backup/yunohost restore” ?
Les applications installées:
- Nextcloud
- Rainloop
- OpenSondage
- Shell in a box
- PhpMyAdmin
Aucune configuration spécifique ou exotique effectuée.
My YunoHost configuration
Internet access: Fiber 1GB
YunoHost version:
yunohost: latest version
yunohost-admin: latest version
moulinette: latest version
ssowat: latest version
Le résultat d’un ‘df -h’:
/dev/mapper/VM–LCDR–NEW–vg-root 5,7G 2,2G 3,2G 40% /
/dev/sda1 236M 63M 162M 28% /boot
/dev/mapper/DATAS-HOME 536G 453G 57G 89% /home
et un ‘ls -thl’ dans le répertoire /home/yunohost.backup/archives,
root@VM-LCDR-NEW:/home/yunohost.backup/archives# ls -htl
total 246G
-rw-r–r-- 1 root root 246G juil. 21 19:29 test-20180721.tar.gz
-rw-r–r-- 1 root root 2,2K juil. 21 11:16 test-20180721.info.json
{
“host”: “Debian 9.5”,
“kernel”: “4.9.0-7-amd64”,
“packages”: {
“yunohost”: {
“repo”: “stable”,
“version”: “3.0.0.1”
},
“yunohost-admin”: {
“repo”: “stable”,
“version”: “3.0.0”
},
“moulinette”: {
“repo”: “stable”,
“version”: “3.0.0”
},
“ssowat”: {
“repo”: “stable”,
“version”: “3.0.0”
}
},
“backports”: [],
“system”: {},
“nginx”: [
“nginx: the configuration file /etc/nginx/nginx.conf syntax is ok”,
“nginx: configuration file /etc/nginx/nginx.conf test is successful”
],
“services”: {
“glances”: “exited (enabled)”,
“nslcd”: “running (enabled)”,
“metronome”: “running (enabled)”,
“postfix”: “exited (enabled)”,
“rspamd”: “running (enabled)”,
“yunohost-firewall”: “exited (enabled)”,
“dovecot”: “running (enabled)”,
“nginx”: “running (enabled)”,
“php7.0-fpm”: “running (enabled)”,
“dnsmasq”: “running (enabled)”,
“fail2ban”: “running (enabled)”,
“yunohost-api”: “running (enabled)”,
“mysql”: “running (enabled)”,
“avahi-daemon”: “running (enabled)”,
“shellinabox”: “running (enabled)”,
“redis-server”: “running (enabled)”,
“slapd”: “running (enabled)”,
“ssh”: “running (enabled)”
},
“applications”: {
“phpmyadmin”: “phpMyAdmin”,
“opensondage”: “OpenSondage”,
“rainloop”: “Rainloop”,
“shellinabox”: “Shell In A Box”,
“nextcloud”: “Nextcloud”
},
“security”: {
“CVE-2017-5754”: {
“name”: “meltdown”,
“vulnerable”: false
}
}