Option to ignore data of filesystems which are not well supported.
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
As mentioned in https://sourceforge.net/p/clonezilla/bugs/314/ it would be great if there were an option to skip cloning the data of unsupported filesystems and instead just create a small empty "stub" image of those partitions. I don't believe this feature presently exists in the GUI.
Such an option option can save a lot of time when imaging entire disks; especially when unsupported filesystems contain temporary information that's only useful on a running system (e.g. swap, ZFS l2arc). This type of data is re-created after a reboot and having a complete image of it is not usually warranted.
The following patch provides a more detailed specification of the functionality the option should provide:
--- ocs-onthefly.~1~ 2019-03-30 14:58:26.206243429 -0400 +++ ocs-onthefly 2019-03-30 15:00:41.834491709 -0400 @@ -1185,7 +1185,7 @@ trigger_dd_status_report $tgt_p $pt_size & dd_report_sig_pid=$! start_time="$(date +%s%N)" - LC_ALL=C dd bs=1M if=$src_p of=$tgt_p 2>&1 | tee $dd_img_info_tmp + LC_ALL=C dd bs=1 count=1 if=/dev/zero of=$tgt_p 2>&1 | tee $dd_img_info_tmp ret=$? end_time="$(date +%s%N)" kill -9 $dd_report_sig_pid &>/dev/null @@ -1375,7 +1375,7 @@ case "$S2S_CLONE_PROG_IN_OCS_ONTHEFLY" in dd) echo "Filesystem in $src_p is not well supported. Use dd to clone..." | tee --append $OCS_LOGFILE - LC_ALL=C dd bs=1M if=$src_p | \ + LC_ALL=C dd bs=1 count=1 if=/dev/zero | \ $filter_comp | $NC_CMD -l $NC_LOCAL_PORT_OPT $NC_PORT & ret=$? ;;
Although the previous comment describes the intention, the attached script can be used to achieve the desired effect in practice.
It's difficult to tell which file system is useless, especially when there are some new file system is not supported, like APFS. Therefore, yes, if there is an option to let user to decide that, sure. It's better. Will try to implement that in the future release. Thanks.
Steven