#859 PR merged: First step to support new ftpfs BACKUP_URL

Labels: enhancement, fixed / solved / done

jsmeix opened issue at 2016-06-02 17:04:

See https://github.com/rear/rear/issues/845

I tested it on SLE12 x86_64 kvm/qemu virtual machine
with BIOS and this /etc/rear/local.conf:

OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL=ftpfs://rear:rear@10.160.4.244/rear
NETFS_KEEP_OLD_BACKUP_COPY=yes
SSH_ROOT_PASSWORD="rear"
USE_DHCLIENT="yes"

The currently supported ftpfs BACKUP_URL syntax is

ftpfs://user:password@host/path

where password is optional.

The only missing piece for me is that
in the rear recovery system one must
manually load the fuse kernel module with

modprobe fuse

because otherwise "rear recover" aborts with

Mount command 'curlftpfs ...' failed.

At least for me the backup via curlftpfs is
very much slower than the backup via NFS.

For backup via NFS "rear mkbackup" reports

Archived 916 MiB in 163 seconds [avg 5759 KiB/sec]

while in contrast for backup via curlftpfs "rear mkbackup" reports

Archived 916 MiB in 1744 seconds [avg 538 KiB/sec]

But the restore via curlftpfs is as fast as via NFS.
For restore via curlftpfs "rear recover" reports

Restored 2409 MiB in 38 seconds [avg 64942 KiB/sec]

jsmeix commented at 2016-06-02 17:11:

@gdha
could you please have a look
whether or not it seems to be o.k. for you.

In particular I like that you have a look at my
"FIXME" comments in 05_check_NETFS_requirements.sh
because I think those are real (minor) bugs.

jsmeix commented at 2016-06-03 10:00:

With latest commits I improved it as follows:

In global-functions.sh I ensure the fuse kernel module
is loaded for the new ftpfs BACKUP_URL because
ftpfs (via CurlFtpFS) is based on FUSE.
I simply call "modprobe fuse" when fuse in not yet loaded.
I found such kind of code at other places in rear
so that I assume it is o.k. to do it this way.

In 05_check_NETFS_requirements.sh
I soveld some FIXME issues according
to the above comments from @gdha

FYI:
Without password in the ftpfs BACKUP_URL e.g.

BACKUP_URL=ftpfs://rear@10.160.4.244/rear

the password is requested multiple times.

Three times for "rear mkbackup"

# rear -d -D mkbackup
...
Using log file: /var/log/rear/rear-d26.log
Enter host password for user 'rear':
Creating disk layout
...
Creating initramfs
Enter host password for user 'rear':
Making ISO image
...
Copying resulting files to ftpfs location
Enter host password for user 'rear':
Encrypting disabled
Creating tar archive...
...
Archived 916 MiB in 1678 seconds [avg 559 KiB/sec]

Two times for "rear recover"

# rear -d -D recover
...
Using log file: /var/log/rear/rear-d26.log
insmod /lib/modules/3.12.51-60.25-default/kernel/fs/fuse/fuse.ko 
Enter host password for user 'rear':
NOTICE: Will do driver migration
...
Disk layout created.
Enter host password for user 'rear':
Decrypting disabled
Restoring from ...
...
Restored 2393 MiB in 38 seconds [avg 64490 KiB/sec]

But all in all it now works sufficiently well for me as a
"First step to support new ftpfs BACKUP_URL"
so that I think I will merge it.

jsmeix commented at 2016-06-03 10:04:

@gdha regarding
"more complex ... if we are working with SSL certificates":

I will leave such enhancements for
"Further steps to support new ftpfs BACKUP_URL".

I think as a first step it is now good enough.

@gdha
many thanks for your valuable feedback and comments!


[Export of Github issue for rear/rear.]