YunoHost-Apps / archivist_ynh

GNU General Public License v3.0
12 stars 4 forks source link

Archivist created no backups #51

Open CodeShakingSheep opened 1 year ago

CodeShakingSheep commented 1 year ago

Describe the bug

I installed archivist some days ago and set the backup interval to daily. However, there are no backups from archivist to be found. I also uninstalled and reinstalled the app. Still, no backups. Should those backups be also visible in the web admin panel where the manually made Yunohost backups are visible?

Context

Steps to reproduce

I just installed the Archivist app. Uninstalled and reinstalled it again. Still, no backups.

Expected behavior

Backups are being created.

Logs

There are no archivist logs being generated (looked in /var/log/archivist). The dir is empty.

maniackcrudelis commented 1 year ago

Hi

You may try to run archivist manually, from CLI,

nice -n10 /opt/yunohost/archivist/archivist.sh

or using the action force_backup, if actions are actually working !

And see if Archivist is showing you any errors.

CodeShakingSheep commented 1 year ago

Thank you for your answer. I ran the command and the backups were successfully generated under yunohost.backup/archives directory. I can also see these backups in the webadmin panel. However, it was separate backups of all apps and yunohost config. Is there the possibility to create one common backup with all apps and yunohost config included?

Also, I found backups now under yunohost.app/archivist/backup/ynh_backup. There are also entries of all apps in the files backup_list and enc_backup_list under yunohost.app/archivist/backup/ directory. However, yunohost.app/archivist/encrypted_backup is empty, although in Backup_list.conf encrypt=true. Can you elaborate on how all of this is related?

And the question remains whether no automated backups are being created. I post some relevant parts of my config:

## OPTIONS

# Backup directory.
backup_dir=/home/yunohost.app/archivist/backup

# Encrypted backup directory.
# Usually just next to the backup directory
enc_backup_dir=/home/yunohost.app/archivist/encrypted_backup

# Encryption
# true/false
encrypt=true
# Password for encryption
# This file should be set at chmod 400
cryptpass=/opt/yunohost/archivist/passkey

There are still no logs to be found under var/log/archivist. Thank you for clarification.

Edit: I just checked /etc/cron.d/archivist. Content looks fine to me. 0 2 * * * root nice -n10 /opt/yunohost/archivist/archivist.sh | tee -a /var/log/archivist/archivist.log 2>&1

maniackcrudelis commented 1 year ago

Is there the possibility to create one common backup with all apps and yunohost config included?

No, backups are separate on purpose, so it would make smaller files and update only those that are different.

However, yunohost.app/archivist/encrypted_backup is empty, although in Backup_list.conf encrypt=true. Can you elaborate on how all of this is related?

As explained in the documentation, your local backup will stay clear, so you can easily explore and restore them when you need. Encryption is for distant backup, however, the directory /home/yunohost.app/archivist/encrypted_backup only contains a mounted and encrypted version of your clear files during the upload of the files on the distant devices. This is intended to not duplicate the files and to speed up the process, as there's no local copy involved.

As archivist works fine with a manual execution, the error is to be find into the cron file. Which looks indeed quite fine... I can suggest to try to find what could be the error by removing the logging, removing the nice command or changing the frequency. But globally, I don't see any error in here...