weresync(1)

weresync1

Clone linux drives incrementally weresync-gui - gui interface for the weresync program.

Usage

weresync-gui

Overview

WereSync clones linux drives incrementally producing a bootable clone. Clones produced by WereSync will have different UUIDs than the original drive, but WereSync will update the fstab and bootloader to allow the clone to properly boot. Clones can be created with one command or one button click, using weresync or weresync-gui respectively.

Options

The weresync-gui command takes no arguments. These arguments apply to the weresync command.

--h, --help

Displays help message.

-C, --check-and-partition

Checks if all partitions are large enough and formatted correctly to allow drive to be copied. If the partitions are not valid, the target drive will be re-partitioned and reformatted. If unset, no checking occurs.

-s, --source-mask MASK

A string to be passed to format() that will produce a partition identifier (/dev/sda1 or such) of the source drive when passed two arguments: the identifier ("/dev/sda") and a partition number in that order. Defaults to "{0}{1}"

-t, --target-mask MASK

A string to be passed to format() that will produce a partition identifier (/dev/sda1 or such) of the source drive when passed two arguments: the identifier ("/dev/sda") and a partition number in that order. Defaults to "{0}{1}".

-e, --excluded-partitions LIST

A list of comma separated partition numbers that should not be searched or copied at any time. These partitions will still be formatted if -C is passed. Defaults to empty.

-b, --break-on-error

If passed the program will halt if there are any errors copying. This flag is not recommended because it will halt even if encountering a normal issue, like a swap partition.

-g, --root-partition PART_NUM

The partition mounted on /. It is recommended to pass this always, but WereSync will attempt to find the main partition even if it is not passed.

-B, --boot-partition PART_NUM

The partition that should be mounted on /boot of the grub_partition. If you have a separate boot partition, you must use this flag.

-E, --efi-partition PART_NUM

The partition that should be mounted on /boot/efi of the grub_partition. If passed this will create the /boot/efi folder if it does not exist and pass it to grub. Required if you have an EFI partition.

-m, --source-mount DIR

The directory to mount partitions from the source drive on. Cannot be the same as --target-mount. If unset, WereSync generates a randomly named directory in the /tmp dir.

-M, --target-mount DIR

The directory to mount partitions from the target drive on. Cannot be the same as --source-mount. If unset, WereSync generates a randomly named directory in the /tmp dir.

-r, --rsync-args RSYNC_ARGS

The arguments to be passed to the rsync instance used to copy files. Defaults to "-aAXxH --delete"

-l, --lvm SOURCE [TARGET]

This argument expects either one or two arguments specifying the logical volume groups to copy from and to, respectively. If no target VG is passed, WereSync will use the VG SOURCE-copy. If the target does not exist, WereSync will create it.

-L, --bootloader BOOTLOADER

The plugin to use to install the bootloader. Such plugins can be found at the bottom of the help message. Defaults to using the "uuid_copy" plugin.

-v, --verbose

Makes WereSync increase output and include more minor details.

-d, --debug

Causes a huge amount of output, useful for debugging the program. Usually not needed for casual use.

Examples

To copy /dev/sda to /dev/sdb on a UEFI system use:

sudo weresync -C -L grub2 -E 1 -g 2 /dev/sda /dev/sdb

This example uses grub2 as the bootloader (for most other UEFI bootloaders use -L uuid_copy or omit the -L option all together) with the efi partition on /dev/sda1, and the root partition on /dev/sda2.

Subsequent copies should omit the -C option, since it could cause weresync to repartition /dev/sdb again, thus deleting existing data and making weresync's incremental abilities useless.

To copy /dev/sda to /dev/sdb on a BIOS/Legacy system use:

sudo weresync -C -L grub2 -g 1 /dev/sda /dev/sdb

This example uses grub2 as the bootloader (other bootloaders, such as syslinux, may be passed to the -L option) and has the root partition on /dev/sda1. The omittance of the -E option signals to WereSync that this is not a a UEFI drive.

As above, subsequent copies should be initiated without the -C option.

The gui can simply be run with:

sudo weresync-gui

Releases

Unchanged in 3 releases since Debian 11 (Bullseye).

  1. 11–13

Author

Daniel Manila <[email protected]>

From weresync 1.1.5-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.