If I understood correctly, you want to backup path /usr/jails/test/.zfs/snapshots/last_snapshot but have it appear as though you backed up /usr/jails/test?
In other words, you want to change what appears in the “paths” portion of the restic snapshot metadata?
If so, this unfortunately isn’t currently possible from within restic. The feature enhancement to do this is tracked in this issue: Add an option to restic backup to override the snapshot's "paths" field · Issue #2714 · restic/restic · GitHub
Others have previously worked around this before by using chroot (e.g. Creating BTRFS snapshot before runnning restic backup), but that obviously requires more effort.
One small aside:
It wouldn’t be quite this bad. Assuming you’re backing up multiple jails to the same restic repository, the base system would be identical between the jails, and would de-duplicate fully.
So you would end up with one large 2-4GB initial snapshot for the first backup of the first jail, but then only the data individual to each additional jail would be added after that.
Obviously this is still worse than not backing up the base system, but not as bad as a copy of the base system per-jail ![]()