I accidentally deleted a directory. No problem: it is backed up with backup2l
I an easily restore the backup, but I am only getting the directories back, not the files within them.
The files are there, listed with -a but they are not being restored with -r
What am I doing wrong?
Hmmm. The plot thickens. I can’t get backup2l to restore any files, whatever I tell it to do. It lists the files using -l or -a but when you ask it to restore them using -b, it does nothing at all. You can get it to restore directories, but not the files within them.
I’ve tried this on two different servers. Same result. So either I’m consistently doing something very wrong, or backup2l is broken.
So now I have to work out how to extract files directly from the .gz files, I guess
Yup, all the files are there in the .gz backup files so I’m having to extract them from there directly. What a pain!
What is the exact command line you’re using? If I recall correctly, the -r
parameter takes a regexp, so you’ll probably want something like backup2l -r /path/to/directory
or backup2l -r /path/to/directory/.*
I tried various different ones. All failed. It worked just fine with -a and with -l but not with -r.
Even “sudo backup2l -r” only restored ALL the folders, none of the files.
Please would you try it, restoring a file that will also be on my system, so if it works for you, I can try the same command?
I tried it on a third server. I chose a specific file, used -a to list it and uses -r to restore it. All very well and it says it was restoring 1 file(s), but nothing was restored, as you can see from the output of ls at the end.
sympl@buzzz:~/test$ sudo backup2l -a apache2.conf$
backup2l v1.6 by Gundolf Kiefer
Listing available files...
all.1 + 7224 10/15/19 20:53:42 0000.0000 0644 /etc/apache2/apache2.conf
all.2 + 7224 10/15/19 20:53:42 0000.0000 0644 /etc/apache2/apache2.conf
sympl@buzzz:~/test$ sudo backup2l -r apache2.conf$
backup2l v1.6 by Gundolf Kiefer
Active files in <all.214>: 1
found in all.214: 0 ( 1 left)
found in all.213: 0 ( 1 left)
found in all.212: 0 ( 1 left)
found in all.211: 0 ( 1 left)
found in all.21: 0 ( 1 left)
found in all.2: 1 ( 0 left)
Restoring files...
all.2.tar.gz: 1 file(s) using 'DRIVER_TAR_GZ'
sympl@buzzz:~/test$ ls -lah
total 8.0K
drwxr-xr-x 2 sympl sympl 4.0K Jul 5 12:05 .
drwxr-xr-x 10 sympl sympl 4.0K Jul 5 12:05 ..
Interesting… this works okay in Sympl 9, but does only restore directories in Sympl 10 (although the files are being backed up).
I’ve found the problem now, and will push out a fix today.
Any idea of a timescale? I want to restore another directory, and it may be easier to wait for your fix than to unpack from all the .gz files ‘by hand’.
@hairydog It’s live in buster-testing now, and will be in regular buster in the next few minutes once I update the mirror. (Edit: It’s live now.)
Running sympl update
should update you as usual (theres a small fix for sympl-web as well).
sympl-backup is already the newest version (10.0.190908.0).
[later]All good!