On 25 May 2016 at 15:03, Duncan <1i5t5.duncan@xxxxxxx> wrote:
> Dmitry Katsubo posted on Wed, 25 May 2016 16:45:41 +0200 as excerpted:
>> btrfs-restore:
>>
>> * It does not restore special files like named pipes and devices.
>> * Hard-linked files are not correctly restored (they all turn into
>> independent replicas).
>> * If the file cannot be read / recovered, it is still created with zero
>> size (I would expect that the file is not created).
>> * I think that the options '-xmS' should be enabled by default
>> (shouldn't it be a goal to restore as much as possible?).
>> * Option that applies (y) to all questions (completely unattended
>> recovery) is missing.
>
> That latter point is a known sore spot that a lot of people have
> complained about. So it'll almost certainly be addressed eventually, but
> it's a matter of this project vying with all the others so it could be
> awhile.
I'm surprised no one has mentioned, in any of these discussions, what
I believe is the standard method of providing this functionality:
yes | btrfs-restore -options /dev/disk
And if you need it in your initrd on a Debian-like system, put the
following in /etc/initramfs-tools/hooks/yes.hook :
#!/bin/sh
. /usr/share/initramfs-tools/hook-functions
if command -v /usr/bin/yes >/dev/null 2>&1; then
copy_exec /usr/bin/yes usr/bin/yes
copy_exec /usr/bin/yes usr/bin/yes
fi
I haven't tested this, but it seems like it would do the trick.
Cheers,
Nicholas
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html