#1172 PR merged: BLOCKCLONE backup method

Labels: enhancement, documentation, fixed / solved / done

gozora opened issue at 2017-01-19 09:11:

This commit implements block device cloning using dd and ntfsclone.

Documentation is work in progress. Current documentation draft can be found here. I'll add documentation to upstream ReaR code soon.
(sorry lot of work lately :-( )

V.

gozora commented at 2017-01-19 09:35:

Would you mind if I create separate section (12-BLOCKCLONE.adoc) in doc/user-guide ?

jsmeix commented at 2017-01-19 10:01:

I would even recommend to use separated documentation files
for separated backup methods - in particular in this case
because BLOCKCLONE is totally different than other
backup methods.

gozora commented at 2017-01-19 10:08:

Thanks @jsmeix ,

That's exactly what I thought.
I'll add one simple example to 04-scenarios.adoc with reference to 12-BLOCKCLONE.adoc, for more details.

V.

jsmeix commented at 2017-01-19 10:21:

@gozora
right now I found

if [[ "$BLOCKCLONE_STRICT_PARTITIONING" =~ ^[yY1] ]]

It possible I would recommend to use the existing
is_true and is_false functions, see
"Relax-and-Recover functions" in
https://github.com/rear/rear/wiki/Coding-Style

jsmeix commented at 2017-01-19 10:23:

@gozora
I found

case "$label" in
    "msdos")

Better use paired parenthesis for case patterns
so that editor commands (like '%' in 'vi') that
check for matching opening and closing parenthesis
work everywhere in the code, see
"Paired parenthesis" in
https://github.com/rear/rear/wiki/Coding-Style

jsmeix commented at 2017-01-19 10:44:

@gozora
it seems I am a bit slow on the uptake - could
you explain me how the change_default is menat
to be used - I read the comment but I do not understand
how setting $1 to a user input plus evaluating that
cold be useful functionality?

gozora commented at 2017-01-19 10:51:

Hello @jsmeix,
I was looking for simmilar functionality as C's "pass by reference." Hence to change value of parameter passed to function.
I'm currently off my PC and typing on my phone is a bit pain. I'll try to explain it better tomorow.

V.

gozora commented at 2017-01-20 09:40:

Hello @jsmeix,

change_default function was meant as a simplification for dialog, where user is prompted for for either restore destination or destination for disk where partitions should be created:

A small extract from code:

echo -n "Restore $archive_name to device: [$BLOCKCLONE_SOURCE_DEV] "
change_default BLOCKCLONE_SOURCE_DEV

In this case value of BLOCKCLONE_SOURCE_DEV is loaded from *.conf file and is used as default. So user just hits enter this value is used.
If user however enters some string, value in BLOCKCLONE_SOURCE_DEV will be replaced by user choice.

Hope I've explained it better this time.

V.

gdha commented at 2017-01-23 16:30:

@gozora Thanks for the new feature - tomorrow will do a new validation round to see whether it does not break something in other flows.


[Export of Github issue for rear/rear.]