Backup-Data Error (FilePrefixError)

NethServer Version: NethServer release 7.3.1611
Module: Backup-Data

Hello everyone! The backup function worked fine. But a couple of days ago there was such a problem. Can anybody say what’s wrong?

===== Report for data backup =====

Backup started at 2017-06-01 23:08:45
Pre backup scripts status: SUCCESS
Backup script status: ERROR

Extract from log file /var/log/backup-data.log:

2017-06-01 23:08:45 - START - Backup data started
2017-06-01 23:08:48 - STEP - pre-backup-done done
2017-06-01 23:08:48 - ERROR - Backup failed, see /var/log/last-backup.log for details - 7680
2017-06-01 23:08:48 - ERROR - Action backup-data-duplicity failed - 1

Extract from log file /var/log/last-backup.log:

Reading globbing filelist /tmp/oNVMjZ4ftO
Traceback (most recent call last):
File “/usr/bin/duplicity”, line 1546, in
with_tempdir(main)
File “/usr/bin/duplicity”, line 1540, in with_tempdir
fn()
File “/usr/bin/duplicity”, line 1375, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File “/usr/lib64/python2.7/site-packages/duplicity/commandline.py”, line 1154, in ProcessCommandLine
set_selection()
File “/usr/lib64/python2.7/site-packages/duplicity/commandline.py”, line 978, in set_selection
sel.ParseArgs(select_opts, select_files)
File “/usr/lib64/python2.7/site-packages/duplicity/selection.py”, line 272, in ParseArgs
for sf in self.filelist_globbing_get_sfs(filelists[filelists_index], 1, arg):
File “/usr/lib64/python2.7/site-packages/duplicity/selection.py”, line 371, in filelist_globbing_get_sfs
yield self.glob_get_sf(line, include)
File “/usr/lib64/python2.7/site-packages/duplicity/selection.py”, line 434, in glob_get_sf
sel_func = self.glob_get_filename_sf(glob_str, include)
File “/usr/lib64/python2.7/site-packages/duplicity/selection.py”, line 502, in glob_get_filename_sf
raise FilePrefixError(filename)
FilePrefixError: +

1 Like

Seems the same error @Guus is having:

Do you have set up custom inclusions/exclusions?

Hello Marc,

I didn’t setup any inc/excl since there are no fields to select these. Command I use is the full backup function.

Regards

Guus

Hi, Andrey.
Could you report the outcome of this command?

grep -rc "^$" /etc/backup-data.d/

As it looks looks the same error, you might be interested in following the other linked topic.

1 Like

Hi Marc!

/etc/backup-data.d/nethserver-base.exclude:0
/etc/backup-data.d/nethserver-base.include:0
/etc/backup-data.d/nethserver-backup-data.exclude:0
/etc/backup-data.d/custom.include:0
/etc/backup-data.d/custom.exclude:0
/etc/backup-data.d/nethserver-virtualhosts.include:1

Could you please attach the exact content of /etc/backup-data.d/nethserver-virtualhosts.include?

(If it doesn’t work with discourse, feel free to use any other service and share the link).

Same Problem here, since end of last month

NethServer Version: NethServer release 7.3.1611 (Final)
Module: nethserver-backup-data

===== Report for data backup =====

Backup started at 2017-06-06 01:00:10
Pre backup scripts status: SUCCESS
Backup script status: ERROR

Extract from log file /var/log/backup-data.log:

2017-06-06 01:00:10 - START - Backup data started
2017-06-06 01:00:22 - STEP - pre-backup-done done
2017-06-06 01:00:23 - ERROR - Backup failed, see /var/log/last-backup.log for details - 7680
2017-06-06 01:00:23 - ERROR - Action backup-data-duplicity failed - 1

Extract from log file /var/log/last-backup.log:

Reading globbing filelist /tmp/3z2zTrE1lP
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1375, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 1154, in ProcessCommandLine
    set_selection()
  File "/usr/lib64/python2.7/site-packages/duplicity/commandline.py", line 978, in set_selection
    sel.ParseArgs(select_opts, select_files)
  File "/usr/lib64/python2.7/site-packages/duplicity/selection.py", line 272, in ParseArgs
    for sf in self.filelist_globbing_get_sfs(filelists[filelists_index], 1, arg):
  File "/usr/lib64/python2.7/site-packages/duplicity/selection.py", line 371, in filelist_globbing_get_sfs
    yield self.glob_get_sf(line, include)
  File "/usr/lib64/python2.7/site-packages/duplicity/selection.py", line 434, in glob_get_sf
    sel_func = self.glob_get_filename_sf(glob_str, include)
  File "/usr/lib64/python2.7/site-packages/duplicity/selection.py", line 502, in glob_get_filename_sf
    raise FilePrefixError(filename)
FilePrefixError: +

~]# grep -rc “^$” /etc/backup-data.d/
/etc/backup-data.d/nethserver-base.exclude:0
/etc/backup-data.d/nethserver-base.include:0
/etc/backup-data.d/nethserver-collectd.include:0
/etc/backup-data.d/nethserver-bandwidthd.include:0
/etc/backup-data.d/custom.exclude:0
/etc/backup-data.d/custom.include:0
/etc/backup-data.d/nethserver-backup-data.exclude:0
/etc/backup-data.d/nextcloud.include:0
/etc/backup-data.d/nethserver-virtualhosts.include:1

/etc/backup-data.d/nethserver-virtualhosts.include seems empty
~]# ll /etc/backup-data.d/
total 28
-rw-r–r-- 1 root root 0 Apr 20 18:52 custom.exclude
-rw-r–r-- 1 root root 0 Apr 20 18:52 custom.include
-rw-r–r-- 1 root root 72 Apr 20 18:52 nethserver-backup-data.exclude
-rw-r–r-- 1 root root 29 Feb 9 15:29 nethserver-bandwidthd.include
-rw-r–r-- 1 root root 28 May 30 16:13 nethserver-base.exclude
-rw-r–r-- 1 root root 26 May 30 16:13 nethserver-base.include
-rw-r–r-- 1 root root 18 May 10 12:11 nethserver-collectd.include
-rw-r–r-- 1 root root 1 May 31 06:07 nethserver-virtualhosts.include
-rw-r–r-- 1 root root 39 May 31 10:01 nextcloud.include

I can confirm this is a bug, I will work on it today.

1 Like

The file is empty…

I’ve just created a new issue:

The pull request is not merged yet, but you can already test it:

  • Upgrade the affected package
yum --enablerepo=nethserver-testing update nethserver-backup-config
  • Execute the backup and check the result (must print “SUCCESS”):
backup-data && echo "SUCCESS"

/cc @Guus @Indra @Andrey_Romakhin @dnutan

4 Likes

Upgraded as specified and started backup, looking good, backup still running but I expect it to work now.
When it fails, it fails immediately :innocent:

Show /var/log/last-backup.log
Reading globbing filelist /tmp/4lgHXl7TRz
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Sat May 27 23:00:21 2017
Last full backup is too old, forcing full backup

1 Like

Now the backup works even when an include/exclude file contains empty lines at any position.

# grep -rc "^$" /etc/backup-data.d/
/etc/backup-data.d/nextcloud.include:0
/etc/backup-data.d/nethserver-collectd.include:0
/etc/backup-data.d/nethserver-backup-data.exclude:0
/etc/backup-data.d/nethserver-virtualhosts.include:1
/etc/backup-data.d/nethserver-base.exclude:0
/etc/backup-data.d/nethserver-base.include:0
/etc/backup-data.d/custom.include:3
/etc/backup-data.d/custom.exclude:2
# stat /etc/backup-data.d/nethserver-virtualhosts.include
  Size: 1         	Blocks: 8          IO Block: 4096   regular file
2 Likes

Thanks @Andrey_Romakhin @indra @Guus @dnutan @giacomo

1 Like

Affected package updated like Giacomo suggested.

I restored to the old situation with following command as suggested earlier by Marc.
expand-template /etc/backup-data.d/nethserver-virtualhosts.include

Outcome of grep -rc “^$” /etc/backup-data.d/
/etc/backup-data.d/nethserver-base.exclude:0
/etc/backup-data.d/nethserver-base.include:0
/etc/backup-data.d/nextcloud.include:0
/etc/backup-data.d/custom.exclude:0
/etc/backup-data.d/custom.include:0
/etc/backup-data.d/nethserver-backup-data.exclude:0
/etc/backup-data.d/nethserver-collectd.include:0
/etc/backup-data.d/nethserver-virtualhosts.include.old:1
/etc/backup-data.d/nethserver-virtualhosts.include:1

And my nethserver-virtualhosts.include has once again 1L, 1C but looks empty

And as final result the backup works like a charme.

Thanks to all
Guus

The update has been released and will be available soon on all mirrors.

Thank you for the amazing team work!

1 Like