New app Archivist

en
fr
#5

Hi,

thanks for this nice app !

I tried to run it but met an issue:

> Encrypt backups
fuse: device not found, try 'modprobe fuse' first
fuse failed. Common problems:
- fuse kernel module not installed (modprobe fuse)
- invalid options -- see usage message

I am not sure whether it lacks a dependency or a configuration step ?

I also had this warning:

Warning: ls: cannot access /etc/cron.d/yunohost*: No such file or directory
#6

Hi nicofrand

can you say me what kind of server you use ? A VPS ? A virtual machine ?
Maybe your server doesn’t support fuse.

Did you try to load the module fuse, as the message said ?

#7

It’s an old kimsufi, not a VPS nor a VM.

Running modprob fuse outputs

modprobe: ERROR: could not insert 'fuse': Unknown symbol in module, or unknown parameter (see dmesg)

And dmesg:

[62695517.917773] fuse: Unknown symbol setattr_prepare (err 0)
[62695517.920043] fuse: Unknown symbol sysfs_create_mount_point (err 0)
[62695517.922690] fuse: Unknown symbol sysfs_remove_mount_point (err 0)
[62695588.180485] fuse: Unknown symbol setattr_prepare (err 0)
[62695588.186081] fuse: Unknown symbol sysfs_create_mount_point (err 0)
[62695588.188379] fuse: Unknown symbol sysfs_remove_mount_point (err 0)

#8

According to the great friend stackoverflow, it appears your kernel can be too old.

If you can’t upgrade your kernel, you can desactive the encryption which use fuse.

#9
root@nicofrand:/home/admin# uname -r
3.16.0-4-amd64

I guess upgrading from jessie to the latest debian might do it but I am not sure YNH works on the latest debian ?

#10

YunoHost is not compatible yet with Debian “Stretch” 9.0: Debian Stretch | YunoHost is NOT YET compatible | YunoHost N’EST PAS ENCORE compatible

#11

Then how are people using Archivist ? The kernel version is limited by debian version.

# apt-cache search linux-image                                                                                                                                               
linux-headers-3.16.0-4-amd64 - Header files for Linux 3.16.0-4-amd64                                                                                                                                   
linux-image-3.16.0-4-amd64 - Linux 3.16 for 64-bit PCs                                                                                                                                                 
linux-image-3.16.0-4-amd64-dbg - Debugging symbols for Linux 3.16.0-4-amd64                                                                                                                            
linux-headers-4.9.0-0.bpo.3-amd64 - Header files for Linux 4.9.0-0.bpo.3-amd64                                                                                                                         
linux-headers-4.9.0-0.bpo.3-rt-amd64 - Header files for Linux 4.9.0-0.bpo.3-rt-amd64                                                                                                                   
linux-headers-4.9.0-0.bpo.4-amd64 - Header files for Linux 4.9.0-0.bpo.4-amd64                                                                                                                         
linux-headers-4.9.0-0.bpo.4-rt-amd64 - Header files for Linux 4.9.0-0.bpo.4-rt-amd64
linux-image-4.9.0-0.bpo.3-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-0.bpo.3-amd64-dbg - Debug symbols for linux-image-4.9.0-0.bpo.3-amd64
linux-image-4.9.0-0.bpo.3-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-0.bpo.3-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-0.bpo.3-rt-amd64
linux-image-4.9.0-0.bpo.4-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-0.bpo.4-amd64-dbg - Debug symbols for linux-image-4.9.0-0.bpo.4-amd64
linux-image-4.9.0-0.bpo.4-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-0.bpo.4-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-0.bpo.4-rt-amd64
linux-headers-4.9.0-2-grsec-amd64 - Header files for Linux 4.9.0-2-grsec-amd64
linux-image-4.9.0-2-grsec-amd64 - Linux 4.9 for 64-bit PCs, Grsecurity protection
linux-image-grsec-amd64 - Linux image meta-package, grsec featureset
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-amd64-dbg - Debugging symbols for Linux amd64 configuration (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT
linux-image-rt-amd64-dbg - Debugging symbols for Linux rt-amd64 configuration (meta-package)
linux-image-4.9.0-0.bpo.2-amd64 - Linux 4.9 for 64-bit PCs (signed)
linux-image-4.9.0-0.bpo.2-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT (signed)
nvidia-kernel-3.16.0-4-amd64 - NVIDIA binary kernel module for Linux 3.16.0-4-amd64

Or, do I have to install jessie backports ?

#12

There’s something else, I use the same kernel on my server and I have no problem with fuse.
Something in your server seems to block fuse.

#13

Would you mind telling me the ouput of apt-cache policy fuse on your machine, please ? Did you install anything else (fuse2fs maybe ?) ?

#14
fuse:
  Installé : 2.9.3-15+deb8u2
  Candidat : 2.9.3-15+deb8u2
 Table de version :
 *** 2.9.3-15+deb8u2 0
        500 http://ftp.debian.org/debian/ jessie/main i386 Packages
        500 http://security.debian.org/ jessie/updates/main i386 Packages
        100 /var/lib/dpkg/status

fuse2fs is not installed on my server. I’ve not installed anything else to make it working. And, more than anything else, I tried this app with a virtual machine with nothing else except YunoHost.

#15

@Maniack_Crudelis
I am unable to send my backup through rsync ssh. What is the role of destination directory? Do we need to create the destination before hand at the other side?
Can you give an example of ssh_chroot_dir for archivist Eg. ssh_host:test.tld user , ssh_user=test, ssh_pwd=test123 ?

#16

Hi kanhu

The destination directory should exist on the other side. This option is used by rsync to know where it’s supposed to copy the files on the other side.
You can see that as the destination of a cp, except here, this destination is relative to your ssh environment.

If you want to use ssh_chroot_dir with archivist.
Let’s say your ssh_chroot_dir is like that

ssh_user  = test
password  = test123
pub_key   = Not used...
size      = 10G

Your configuration of archivist should be like that:

type                  =rsync_ssh
destination directory =/
ssh_host              =test.tld
ssh_user              =test
ssh_port              =22
ssh_pwd               =test123
#17

I get an error Backup YunoHost core and apps

Make a temporary backup for wordpress_backup

This backup is the same than the previous one
Clean old backup files
Encrypt backups
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the ‘nonempty’ mount option
fuse failed. Common problems:

  • fuse kernel module not installed (modprobe fuse)
  • invalid options – see usage message

Edited: After few minutes this error was gone automatically.

#18

I still not able to see any files in ssh_chroot_dir

type =rsync_ssh
destination directory =/
ssh_host =test.tld
ssh_user =test
ssh_port =22
ssh_pwd =test123

Thu Dec 7 00:50:25 IST 2017

Build list of files to backup
Compress backups

Backup YunoHost core and apps

Make a temporary backup for wordpress_backup

This backup is the same than the previous one
Clean old backup files
Encrypt backups

#19

The error “fuse: mountpoint is not empty” is, as it’s say, because the mountpoint is not empty.
That happens because you probably run the script too many times, and as you seen after, the error automatically gone.
That’s because, the mount point is automatically unmount after a fewer minutes unused.

But, even with that error, you should have your backups created, and duplicate.

Do you see anything about rsync after the lines ?
You should see something about what rsync doing.

#20

I don’t see anything after these lines.
The backup should be there in the data folder of the ssh_chroot_dir?

#21

recipient name should be unique?

#22

Hum no, you can have as many recipient name as you want.
Can you show me your config file ? (Without any sensitive data)

#23

Sure

## 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

# --------------------------------------------------------------------------------------
## YUNOHOST BACKUPS

# YunoHost backups
# Specific backup made by 'yunohost backup' command
# ynh_core_backup=true/false: Make a backup of the core of YunoHost, without any apps.
ynh_core_backup=false

# ynh_app_backup=APP: Make a backup of an app.
# You can add as many lines as you want to save multiple apps.
# List all apps with sudo yunohost app list --installed | grep "id: "
# ynh_app_backup=wordpress
ynh_app_backup=wordpress

# --------------------------------------------------------------------------------------
## FILES BACKUPS

# Max size for each backup in Mb.
# Be carreful, it's only a soft limit, that means the script will try to limit each backup.
# Because, it will never made more than one backup for a single directory (Even if it's a real big directory without subdirectories). And the same if there's files next to subdirectories, only one backup will be made for all this files.
max_size=500

# Backup of files and directories
# Add as many lines as you want for each directory or file you want to be backuped.
# Exclude a directory, a file, or multiples files with a regex with the exclude_backup instruction.
# file_to_backup="/directory/to backup"
# file_to_backup=/file/to backup
# exclude_backup="/directory/to exclude"
# exclude_backup=/file/to exclude
# exclude_backup="/exclude/all/tarball/in_this_directory/.tar.gz$"
file_to_backup=
exclude_backup=

# --------------------------------------------------------------------------------------
## BACKUPS RECIPIENTS

# All options following a recipient name will be enabled for this recipient only.
# > recipient name=Name of this recipient.
# type=Choose between one of the scripts in the "senders" directory.
# destination directory=Directory where to put the backup in the other side.
# encrypt=Override main option for encryption. (true/false) (Optionnal option)
# specific option for type=See the chosen script to know what's the options.
# exclude backup=Exclude a backup file or a directory from the backup. This option can be duplicated. (Optionnal option)
# include backup=Choose the only file or directory which be send. This option can be duplicated. (Optionnal option)

# > recipient name=local example
# type=local
# destination directory=/my/local/backup
# encrypt=false
# exclude backup=/exclude/dir
# include backup=

 recipient name=rsync ssh ssh_chroot_dir server
 type=rsync_ssh
 destination directory=/
 encrypt=true
 ssh_host=test.tld
 ssh_user=test
# ssh_port=22
# ssh_key=/home/user/.ssh/id_rsa
 ssh_pwd=test123
# ssh_options=
# exclude backup=/exclude/dir
# include backup=
#24

Oh ok I get it !

You just missed a "> " before “recipient name”.
These 2 characters are needed to split the config file by recipient.

So recipient name=rsync ssh ssh_chroot_dir server should be > recipient name=rsync ssh ssh_chroot_dir server
And remove the spaces at the beginning of each line, that could induce some errors too.