#3507 Issue closed
: Why is ReaR formating/deleting other drives drive/partition than the system/bootdrive?¶
Labels: support / question
Hausmarke opened issue at 2025-08-07 10:29:¶
Requesting support or just a question¶
How to disable the change made on any other drive than the system/bootdrive?
Platform¶
Linux x64
Output¶
While testing on a server with mutliple storage devices
besides the boot/system disc I found out that per default
ReaR formats/cleans not only the boot/system drive
but also any other drives/partitions which where only mounted/
ur of RearR when it comes to recover a system with a system/boot drive
and multiple other physical drives/partitions...
ReaR formats them during recover and destroys all the data...
Why?
I mean these drives could handle some data
which is not important to the Recover?
But they could be very important for the running system
when you think of File/Sambaserver...
-> Is there a way that ReaR will only(!!!) format/write (do
wathever)
on the system, boot-device and let any other possible drive untouched?
Additional information¶
I have a test system where i excluded under BACKUP_PROG_EXCLUDE
some of my Symlinks to other drives in the system
(btw - why would/should ReaR also backup these drives?!?).
After recovering i was stunned that RaeR had formated/deleted
these drives before linking them in again... again - why?
gdha commented at 2025-08-07 12:13:¶
@Hausmarke Can you paste your ReaR configuration
(/etc/rear/local.conf
)? And, also the output of
lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT
Hausmarke commented at 2025-08-07 12:25:¶
OUTPUT=ISO
OUTPUT_URL=cifs://xxx.xxx.xxxx.xxx/bootimages/
OUTPUT_OPTIONS="cred=/etc/rear/cifs-boot"
BACKUP=NETFS
BACKUP_URL=cifs://xxx.xxx.xxx.xxx/Images-mns/
BACKUP_OPTIONS="cred=/etc/rear/cifs-backup"
BACKUP_PROG_EXCLUDE=("${BACKUP_PROG_EXCLUDE[@]}" '/var/tmp' '/var/crash' '/14TB/*' '/5TB/*')
lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT
NAME KNAME PKNAME TRAN TYPE FSTYPE LABEL SIZE MOUNT
/dev/sda /dev/sda sata disk 223.6G
|-/dev/sda1 /dev/sda1 /dev/sda part 1M
`-/dev/sda2 /dev/sda2 /dev/sda part ext4 223.6G /
/dev/sdb /dev/sdb sata disk 931.5G
`-/dev/sdb1 /dev/sdb1 /dev/sdb part ntfs 1tbRed 931.5G
/dev/sdc /dev/sdc sata disk 12.7T
`-/dev/sdc1 /dev/sdc1 /dev/sdc part ext4 12.7T /14TB
/dev/sdd /dev/sdd sata disk 4.5T
`-/dev/sdd1 /dev/sdd1 /dev/sdd part ext4 4.5T /5TB
/dev/sr0 /dev/sr0 usb rom iso9660 REAR-ISO 751M
`
gdha commented at 2025-08-07 12:38:¶
@Hausmarke
Use the appropriate syntax to exclude the component. For example, add
EXCLUDE_COMPONENTS
to /etc/rear/local.conf
file:
To exclude a mounted filesystem:
EXCLUDE_COMPONENTS=( "fs:/mnt/data" )
To exclude a swap partition: EXCLUDE_COMPONENTS=( "swap:/dev/sdb1" )
To exclude a partition: EXCLUDE_COMPONENTS=( "/dev/sdb2" )
You can exclude multiple components by separating them with spaces:
EXCLUDE_COMPONENTS=( "fs:/mnt/data" "swap:/dev/sdb1" "/dev/sdb2" )
pcahyna commented at 2025-08-07 12:45:¶
While testing on a server with mutliple storage devices besides the boot/system disc I found out that per default ReaR formats/cleans not only the boot/system drive but also any other drives/partitions which where only mounted/
ReaR formats them during recover and destroys all the data...
Why? I mean these drives could handle some data which is not important to the Recover?
ReaR needs to format them in order to recreate what was on them. If you
don't want them to be recreated, you need to exclude them from being
saved, for example using the syntax that @gdha has shown. Check your
/var/lib/rear/layout/disklayout.conf
that gets created by
rear mkbackup
or rear savelayout
or rear mkrescue
to see what gets
included in the layout (and thus will be recreated).
Hausmarke commented at 2025-08-07 17:17:¶
I want only to recreate all the mounted filesystem/symlinks without changing anything in it... i want the same behavior like when i backup and restore via clonezilla.
If i exclude for example my 3 partitions "/dev/sdb" "/dev/sdc" "/dev/sdd" will ReaR still mount the "old" filesystem on it?
gdha commented at 2025-08-11 08:53:¶
@Hausmarke
I want only to recreate all the mounted filesystem/symlinks without changing anything in it... i want the same behavior like when i backup and restore via clonezilla.
If i exclude for example my 3 partitions "/dev/sdb" "/dev/sdc" "/dev/sdd" will ReaR still mount the "old" filesystem on it?
ReaR will only recreate the devices/file systems which are saved in the
/var/lib/rear/layout/disklayout.conf
file. After a ReaR recovery it
will mount again what is mentioned in the /etc/fstab
file.
abbbi commented at 2025-08-12 19:54:¶
only reformatting drives which do not already have the same partition information and/or filesystem on them might make sense. If only one partition is broken, why format all of them during recover? I think that is what OP means.
On the oder side a filesysystem can be broken in subtle ways and
detection mechanism is hard to implement, ruling out all
the corner cases. You might consider removing the known-to-be-good
partitions from the disklayout.conf during recovery to archive your
goal.
Hausmarke commented at 2025-08-12 20:19:¶
only reformatting drives which do not already have the same partition information and/or filesystem on them might make sense. If only one partition is broken, why format all of them during recover? I think that is what OP means.
Exactly - in my opinion this formatting all physical drives should not be the default option - it should be an extra feature. Lets face it a disaster at a server is a problem with the system/bootdrive and not with some datadrive. A datadrive should be controlled and backuped with different tools at a different stage.
It would be cool if there where an simple command line option for ReaR
to enable this -now- default behavior of deleting and empty rebuilding
of any other drives beside the really important boot/systemdrives.
In my case with my bunch of fileservers recovering all in all more than
2PB would take way, way much more time and work than reconfigurating the
Samba, scripts, rsync, rclone, ssh,...
[Export of Github issue for rear/rear.]