Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLOCKCLONE backup method #1172

Merged
merged 2 commits into from Jan 23, 2017
Merged

BLOCKCLONE backup method #1172

merged 2 commits into from Jan 23, 2017

Conversation

gozora
Copy link
Member

@gozora gozora commented Jan 19, 2017

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
Copy link
Member Author

gozora commented Jan 19, 2017

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

@jsmeix
Copy link
Member

jsmeix commented Jan 19, 2017

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.

@jsmeix jsmeix added this to the Rear v2.1 milestone Jan 19, 2017
@jsmeix jsmeix added documentation enhancement Adaptions and new features labels Jan 19, 2017
@jsmeix jsmeix requested a review from gdha January 19, 2017 10:01
@jsmeix jsmeix self-assigned this Jan 19, 2017
@gozora
Copy link
Member Author

gozora commented Jan 19, 2017

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
Copy link
Member

jsmeix commented Jan 19, 2017

@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
Copy link
Member

jsmeix commented Jan 19, 2017

@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
Copy link
Member

jsmeix commented Jan 19, 2017

@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
Copy link
Member Author

gozora commented Jan 19, 2017

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
Copy link
Member Author

gozora commented Jan 20, 2017

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 gdha merged commit 4c117bf into rear:master Jan 23, 2017
@gdha
Copy link
Member

gdha commented Jan 23, 2017

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

@@ -0,0 +1 @@
../../backup/BLOCKCLONE/default/400_copy_disk_struct_files.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gozora , I wonder why are you linking the script from backup here under output. The script uses backup_path, which is not even mounted in the output stage. Also, why to link it under default and not under BLOCKCLONE? Or am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants