# YunoHost (and Internet Cube) surveillance report #3

**URL:** <https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033>\
**Category:** Announcements\
**Tags:** french, english\
**Created:** [November 18, 2015, 9:57pm UTC](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033 "2015-11-18T21:57:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![opi](https://forum.yunohost.org/user_avatar/forum.yunohost.org/opi/32/5_2.png) [@opi](https://forum.yunohost.org/u/opi)\
**Post date:** [November 18, 2015, 9:57pm UTC](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033/1 "2015-11-18T21:57:11Z")

</div>

Gather interesting news and information about YunoHost & Internet Cube projects

- [https://yunohost.org](https://yunohost.org)
- [http://internetcu.be](http://internetcu.be)
- [http://labriqueinter.net](http://labriqueinter.net)

## Content

1. Major update coming
2. New Bugtracker
3. Rspamd as default antispam
4. Applications
5. Development environment
6. LaBriqueInternet french flyer
7. Miscellaneous news
8. Upcoming events

## Major update coming

The major update containing the changes made at the last Brique Camp (package merging, backup/restore, smart configuration generation, see [previous surveillance report](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-2/918)) is coming. It will require a manual update of the repositories and dependencies. An automated script is coming too.

You can try the current testing version now by following [those instructions](http://pad.farcie.fr/p/yunohost-testing).

## BugTracker migration

[New bugtracker](https://dev.yunohost.org) has been filled with the current GitHub’s opened issues.  
You can report new issues anonymously or authenticate using your GitHub account.  
The Internet Cube project and YunoHost had been splitted to separate the concerns.

## Rspamd as default antispam

[Rspamd offical website](https://rspamd.com/)  
jerome is working hard on it: Rspamd could replace amavis and spamassassin and provide a faster anti-spam solution which take less RAM.  
It needs some [testers](http://pad.farcie.fr/p/yunohost-testing)

## Applications

- New official application: [Kanboard](https://github.com/mbugeia/kanboard_ynh)

- mbugeia, known as tostaki, published a working package of [Gogs](https://github.com/mbugeia/gogs_ynh).  
He merged previous work from Josue-T, did some cleanup and configuration

- jocelynd and opi work on a proof-of-concept using ansible to manage app installation scripts: [https://github.com/opi/anarchism\_ynh/tree/ansible](https://github.com/opi/anarchism_ynh/tree/ansible) and [https://github.com/opi/anarchism\_ynh/tree/ansible-structured](https://github.com/opi/anarchism_ynh/tree/ansible-structured)

- zamentur and realitygaps has packaged the [version 8.2 of OwnCloud](https://github.com/Kloadut/owncloud_ynh). There is a gpg and sha256sum check to allow to easily be sure that it is the good sources.

## Development environment

A command line tool has been created by ljf to deploy and manage quickly a developement environement. Code is on [https://github.com/zamentur/yunohost-development](https://github.com/zamentur/yunohost-development), with corresponding [documentation](https://yunohost.org/dev_fr)

This tools seems usable but the cli command could be improved. This work is based on docker and vagrant images already done by ljf.

- [https://github.com/zamentur/Dockerfile](https://github.com/zamentur/Dockerfile)
- [https://github.com/zamentur/yunohost-vagrant](https://github.com/zamentur/yunohost-vagrant)

## LaBriqueInternet french flyer

InternetCube, or LaBriqueInternet is not just code, but also communication toward non-tech people. Here’s a flyer (in french) for people who get their Cube from a local ISP from [FFDN](http://ffdn.org)

[http://labriqueinter.net/stuff/getting\_started.pdf](http://labriqueinter.net/stuff/getting_started.pdf)

## Miscellaneous news

- Thanks to Bram, one can now display debug information about a specific app, from command line and even from administration interface (testing branch).
- [Let’s Encrypt integration](https://github.com/YunoHost/yunohost/pull/114) has been started by mbugeia.
- [coin](https://code.ffdn.org/zorun/coin) developers started to think about [.cube files](http://internetcu.be/dotcubefiles.html) support so that non-profit ISP using it can provide directly .cube files strainght from the members interface.

## Upcoming events

- [Capitole du Libre](https://2015.capitoledulibre.org/) canceled —\> [Bazar du Libre](http://bazardulibre.org)
- [32C3](https://events.ccc.de/)
- [FOSDEM](https://fosdem.org/2016/)

---

<div class="post-metadata">

**Author:** ![opi](https://forum.yunohost.org/user_avatar/forum.yunohost.org/opi/32/5_2.png) [@opi](https://forum.yunohost.org/u/opi)\
**Post date:** [November 18, 2015, 9:58pm UTC](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033/2 "2015-11-18T21:58:24Z")

</div>

Working pad for next episode: [https://pad.riseup.net/p/ynh-news](https://pad.riseup.net/p/ynh-news)

---

<div class="post-metadata">

**Author:** ![opi](https://forum.yunohost.org/user_avatar/forum.yunohost.org/opi/32/5_2.png) [@opi](https://forum.yunohost.org/u/opi)\
**Post date:** [November 18, 2015, 10:05pm UTC](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033/3 "2015-11-18T22:05:35Z")

</div>

Pinned globally on November 18, 2015, 10:05pm UTC



---

<div class="post-metadata">

**Author:** ![n00dl3](https://forum.yunohost.org/user_avatar/forum.yunohost.org/n00dl3/32/236_2.png) [@n00dl3](https://forum.yunohost.org/u/n00dl3)\
**Post date:** [November 19, 2015, 10:31am UTC](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033/4 "2015-11-19T10:31:35Z")

</div>

I’m curious about how the backup/restore will work…  
@opi or someone could explain this a bit more, or indicate an article/post that explains this ?

---

<div class="post-metadata">

**Author:** ![ljf](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ljf/32/58_2.png) [@ljf](https://forum.yunohost.org/u/ljf)\
**Post date:** [November 26, 2015, 1:09pm UTC](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033/5 "2015-11-26T13:09:36Z")

</div>

In this version you can backup with cli or with the web admin. The cli way allows you to do more things. The webadmin way is more accessible.

#Webadmin way  
Basically with the webadmin, you can:

- backup into /home/yunohost/archives/
- choose to backup one or more things between mail data, home data, configuration and apps
- list your backup
- see what there is in a backup
- restore selectively a backup

**Caution:** to do a backup, you need to have enough free disk spaces in the destination directory. For example, if you have 20GB in /home/data you need to have enough space to contain this 20GB compressed in a tar.gz. To do the tar.gz, yunohost backup use shallow copy, to avoid to need more spaces to be able to create the tar.gz .  
**Caution:** If you use selective restore, be sure to not create discordant operation. For example, if you restore an app using a domain that have been deleted from YunoHost, you need to read the domain or to restore all configuration files.

We have already planned where we will add some feature like:

- backup in an other place
- download/upload a backup
- crypt a backup  
Some feature are almost ready in webadmin, but the api is not for the moment.

#CLI way

## Backup

You can make a full backup by running this command:

```bash
admin@yunohost:~# sudo yunohost backup create
Exécution des scripts de sauvegarde...
Attention : backup script '/etc/yunohost/apps/phpmyadmin/scripts/backup' not found
Attention : App 'phpmyadmin' will not be saved
Lancement du script de sauvegarde de l'application 'odoo'...
Création de l'archive de sauvegarde...
Succès ! Sauvegarde terminée
archive:
  hooks:
    conf_ssh: /usr/share/yunohost/hooks/backup/08-conf_ssh
    conf_ynh_firewall: /usr/share/yunohost/hooks/backup/20-conf_ynh_firewall
    data_mail: /usr/share/yunohost/hooks/backup/23-data_mail
    conf_cron: /usr/share/yunohost/hooks/backup/32-conf_cron
    conf_ynh_certs: /usr/share/yunohost/hooks/backup/21-conf_ynh_certs
    conf_ynh_mysql: /usr/share/yunohost/hooks/backup/11-conf_ynh_mysql
    conf_xmpp: /usr/share/yunohost/hooks/backup/26-conf_xmpp
    data_home: /usr/share/yunohost/hooks/backup/17-data_home
    conf_nginx: /usr/share/yunohost/hooks/backup/29-conf_nginx
    conf_ssowat: /usr/share/yunohost/hooks/backup/14-conf_ssowat
    conf_ldap: /usr/share/yunohost/hooks/backup/05-conf_ldap
  created_at: 1448540733
  apps:
    odoo:
      version: -
      name: Odoo
      description: Odoo est une collection d'apps de gestion d'entreprise (ERP : CRM, Comptabilité, Point de Vente, RH, Achats, ...).
  description:
  name: 20151126-132533
admin@yunohost:~# sudo ls /home/yunohost.backup/archives/
20151126-132533.info.json 20151126-132533.tar.gz

```

By default, it backups in /home/yunohost.backup/archives/, but you can set your own directory with -o option. It could be an usb key or an other mounted filesystem.

If an app has no backup script it warns you.

As you can see in the answer, there is 2 hooks which backup data (data\_home and data\_mail). By default, the mysql data aren’t saved, because the apps should save themselves their databases.

**Note:** `yunohost backup` is not able currently to create diff backup. But you can use the -r option to avoid compression and use an other backup tool to make diff backup.

## Restore

To do a restore

```bash
admin@yunohost:~# sudo yunohost backup restore 20151126-132533

```

You can choose to apply only some parts of the backup, by selecting which restore hooks and which apps to restore.

# Packaging informations

You can see an example to make backup and restore scripts here  
[https://github.com/YunoHost/example\_ynh/tree/testing](https://github.com/YunoHost/example_ynh/tree/testing)  
and

> **[zamentur/strut\_ynh](https://github.com/zamentur/strut_ynh/)**
>
> Strut - An Impress.js and Bespoke.js Presentation Editor - zamentur/strut\_ynh

There is some helpers to do shadow copy if you have big quantity of data to backup (owncloud, video apps, etc…).

**Note:** During a backup operation, the restore script associated is saved. So in a restore operation, yunohost use the saved restore script and not the most recent script.

If you want modify a general conf file, you should use hooks to trigger a modification of the conf file after each call of `yunohost regenconf`.  
You can also use the regeneration configuration system to do index your conf file, and allow your user to be warn if an upgrade of your app has change a config file.

# Annex

```bash
usage: yunohost backup create [-h] [-d DESCRIPTION] [-o OUTPUT_DIRECTORY]
                              [-n NAME] [--ignore-hooks]
                              [--hooks [HOOKS [HOOKS ...]]]
                              [--apps [APPS [APPS ...]]] [-r] [--ignore-apps]

optional arguments:
  -h, --help show this help message and exit
  -d DESCRIPTION, --description DESCRIPTION
                        Short description of the backup
  -o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
                        Output directory for the backup
  -n NAME, --name NAME Name of the backup archive
  --ignore-hooks Do not execute backup hooks
  --hooks [HOOKS [HOOKS ...]]
                        List of backup hooks names to execute
  --apps [APPS [APPS ...]]
                        List of application names to backup
  -r, --no-compress Do not create an archive file
  --ignore-apps Do not backup apps

usage: yunohost backup restore [-h] [--force] [--hooks [HOOKS [HOOKS ...]]]
                               [--ignore-hooks] [--apps [APPS [APPS ...]]]
                               [--ignore-apps]
                               name

positional arguments:
  name Name of the local backup archive

optional arguments:
  -h, --help show this help message and exit
  --force Force restauration on an already installed system
  --hooks [HOOKS [HOOKS ...]]
                        List of restauration hooks names to execute
  --ignore-hooks Do not restore hooks
  --apps [APPS [APPS ...]]
                        List of application names to restore
  --ignore-apps Do not restore apps

usage: yunohost backup [-h] {info,restore,create,list,delete} ...

optional arguments:
  -h, --help show this help message and exit

actions:
  {info,restore,create,list,delete}
    info Show info about a local backup archive
    restore Restore from a local backup archive
    create Create a backup local archive
    list List available local backup archives
    delete Delete a backup archive
root@staging1:/home/admin# sudo yunohost backup list --help
usage: yunohost backup list [-h] [-i] [-H]

optional arguments:
  -h, --help show this help message and exit
  -i, --with-info Show backup information for each archive
  -H, --human-readable Print sizes in human readable format

```

---

<div class="post-metadata">

**Author:** ![tostaki](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tostaki/32/479_2.png) [@tostaki](https://forum.yunohost.org/u/tostaki)\
**Post date:** [December 22, 2015, 5:43pm UTC](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033/6 "2015-12-22T17:43:49Z")

</div>

Hi @ljf,

I have some questions about the philosophy behind the backup/restore system.

- Install and restore script tend to have a lot of redundant code. Is it a good practise to make a “yunohost app install” in the restore script then restore all data / config ? If yes, I guess that the original install script isn’t saved automatically, so I have to pulled it from github, right ? Is there a way to know the git commit which is installed during backup for pulling the right install script during restore ?
- Are the yunohost settings of an app (/etc/yunohost/appname/settings.yml) saved automatically ? If yes, can we use the settings in the restore script (like db\_pwd=$(sudo yunohost app setting $APP mysqlpwd) )
- Can you confirm that (one of) the goal of the restore system is to reinstall an app on a fresh yunohost with all general config (users, domains) already restored ?
- Can we restore on an already installed app or the app have to be removed before? (I guess it’s the – force option but it’s not clear)

Thanks a lot

---

<div class="post-metadata">

**Author:** ![ljf](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ljf/32/58_2.png) [@ljf](https://forum.yunohost.org/u/ljf)\
**Post date:** [December 24, 2015, 5:29pm UTC](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033/7 "2015-12-24T17:29:34Z")

</div>

Hi @tostaki ,

> Install and restore script tend to have a lot of redundant code. Is it a good practise to make a “yunohost app install” in the restore script then restore all data / config ? If yes, I guess that the original install script isn’t saved automatically, so I have to pulled it from github, right ? Is there a way to know the git commit which is installed during backup for pulling the right install script during restore ?

I don’t remember if we save only restore script or all scripts directory.  
We should save the entire script directory, if we don’t (you can verify by opening an archive), you can save it in your backup directory.  
You can also find the git commit id in settings (last parameters) but only if the app was install from a git repository, if you install it from a directory, there is no commit id…

> Are the yunohost settings of an app (/etc/yunohost/appname/settings.yml) saved automatically ? If yes, can we use the settings in the restore script (like db\_pwd=$(sudo yunohost app setting $APP mysqlpwd) )

Yes, you can

> Can you confirm that (one of) the goal of the restore system is to reinstall an app on a fresh yunohost with all general config (users, domains) already restored ?

Yes, it is. If the user has reconfigured a fresh system and set old users and domains, your app should restore correctly. If you do a complete backup, you can restore completely the system (users and domain configuration are saved in the complete backup)

> Can we restore on an already installed app or the app have to be removed before? (I guess it’s the – force option but it’s not clear)

The app should be removed before in all cases.  
The --force option avoid to have to confirm that you really want to restore on an already postinstall system. A postinstall system is a YunoHost on which you already have run `yunohost tools postinstall` command.  
Indeed, now when you restore on a fresh YunoHost, you can choose to apply a `yunohost restore` or a `yunohost tools postinstall`.  
We should offer this possibility on the web administration in future version.

---

<div class="post-metadata">

**Author:** ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)\
**Post date:** [January 18, 2023, 8:09pm UTC](https://forum.yunohost.org/t/yunohost-and-internet-cube-surveillance-report-3/1033/8 "2023-01-18T20:09:54Z")

</div>

Closed on January 18, 2023, 8:09pm UTC


