#3522 Issue open: Is it actually possible to create the rescue image to a flash drive and backup via rsync

Labels: support / question

noambernstein opened issue at 2025-09-19 16:35:

Requesting support or just a question

How do I set up a rear backup that saves the bootable rescue image to a usb flash drive and the backup itself to a remote machine via rsync

Platform

Ubuntu 22 with rear 29 from a recent git clone

Additional information

If I set

OUTPUT=USB
OUTPUT_URL=usb:///dev/disk/by-label/REAR-000

BACKUP=RSYNC
BACKUP_URL=rsync://my_server/path/to/images

rear mkrescue -v attempts to rsync something to my_server, despite the fact that I intended to make the image creation/saving process (the OUTPUT_* variables) be entirely local. If I allow the rsync connections, it eventually complains about xattr, which doesn't make sense if it's trying to create and store the bootable image locally.

If I set BACKUP=NETFS, which the man page strongly implies should work with BACKUP_URL=rsync://..., I get

ERROR: Invalid scheme 'rsync' in BACKUP_URL 'rsync://my_server/path/to/backups' valid schemes: nfs cifs usb tape file iso sshfs ftpfs

FWIW, I also tried OUTPUT=ISO and OUTPUT_URL=file://... with BACKUP=RSYNC, assuming I could burn to a flash drive later, but it again attempted to rsync during mkrescue.

Is there a way to get this combination (bootable image to flash drive, backup content to remote machine over rsync or scp, i.e. not NFS or CIFS) to work?

jsmeix commented at 2025-10-28 14:54:

@noambernstein

onyl FYI
a totally offhanded and untested idea
what might help out here in a generic way:

My assumption is that somehow the config variables
OUTPUT and OUTPUT_URL versus BACKUP and BACKUP_URL
have some more or less hardcoded interdependencies
so one cannot freely use arbitrary combinations.

So my basic idea is to get separated things separated
i.e. what config variables settings are used for
"rear mkrescue" versus for "rear mkbackuponly".

You cannot use "rear mkbackup" when you want the
ReaR recovery system be made different than what
is used for the backup.
I guess this could be the reason behind why you see
interdependencies between OUTPUT and OUTPUT_URL
versus BACKUP and BACKUP_URL.
When you want the ReaR recovery system to be made
different than what is used for the backup you must use
"rear mkrescue" with its specific config variables settings
to make only the ReaR recovery system (without backup)
versus
"rear mkbackuponly" with its specific config variables settings
to make only the backup (without ReaR recovery system).

To do this have a look at

https://github.com/rear/rear/blob/release/2.9/doc/user-guide/11-multiple-backups.adoc

In particular in its section
"Relax-and-Recover Setup for Different Backup Methods"
note this part:

Using different backup methods requires to get all the
binaries and all other needed files of all used backup methods
into the ReaR recovery/rescue system during "rear ... mkrescue".

Those binaries and other needed files must be manually specified
via REQUIRED_PROGS and COPY_AS_IS in /etc/rear/local.conf
(regarding REQUIRED_PROGS and COPY_AS_IS see conf/default.conf).

I have no idea whether or not this may or may not work
for what you need here - but you may at least try out
how far this might help for your specific use case.


[Export of Github issue for rear/rear.]