New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BORG: Unable to exclude swapfile from backup #2168
Comments
Since Borg is using same exclude mechanism as e.g. NETFS, can you try some of https://github.com/rear/rear/blob/master/usr/share/rear/conf/default.conf#L2387, especially V. |
thanks. what is the syntax for EXCLUDE_BACKUP ? should I use only EXCLUDE_BACKUP instead of all the below variables? |
tried
and
still backed up swapfile |
@gaia
I think you should run "rear -D mkbackup" in debug mode Additionally you may use I guess you may need |
Thank you, I used -d to keep the tmp dir. I assumed the swapfile is being backed up because I see What I can't give up on is /home and other dirs (although some not important) not being included in the backup: lsblk: PS: I can't use INCLUDE_ONLY at all. this is a recipe for disaster when you are trying to backup a root partition. the only possibility would be using borg directly to backup the root FS and having rear backup only the resulting borg repo. here's the current local.conf:
backup-include.txt (why are the first two included?)
backup-exclude.txt:
|
usr/share/rear/layout/save/default/340_generate_mountpoint_device.sh I do not use Borg but plain 'tar' I compared in etc/rear/local.conf
and I got exactly the same files in my backup in both cases. I have those real disk filesystems mounted
accordingly I need to specify I got a /tmp/rear.XXX/tmp/backup-include.txt file that contains
All what BACKUP_ONLY_INCLUDE requires for me with 'tar' This is because 'tar' is called in But I don't know if things may actually behave different with Borg |
thanks. I tried with
with no exclusions. it still did not include /home (and others) could i use borg separately, and use rear to backup only the borg backup to the USB? I'd imagine I'd first restore with rear a minimal system, then restore the actual system with borg on a 2nd pass. |
@gaia What about using only |
@adatum that's what I ended up doing. thanks. |
@gaia When you use
the whole point of BACKUP_ONLY_INCLUDE="yes" is
when /home is mounted separately or behaves this way. Strange - it seems in your case /home in not mounted separately. |
Relax-and-Recover 2.5 / 2019-05-10
Debian GNU/Linux 9.9 (stretch)
cat /etc/rear/local.conf: see below
Intel X86_64 bare metal
UEFI with Grub2
Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe): see below
I cannot exclude the swapfile from the backup. I've tried different ways of setting the exclude (single/double quotes, exclude by mountpoint/components/device, relative/absolute path).
Swap is mounted as /mnt/storage/swapfile on /dev/mapper/lvmt_storage1-lvmt_storage1. The USB disk where the backups are stored is /dev/sdc on /mnt/usb/. I've tried to run ReaR with the drive mounted and unmounted.
The only item I want to backup is the root partition to the USB drive, with no mountpoints and some standard exclusions. The only item I would want to restore is also the root partition, leaving the other filesystems intact. I feel this is a good strategy of backup size vs safety, as the contents of /zfs_containers2 are on RAID 1 and will be backed up to /dev/mapper/lvmt_storage1-lvmt_storage1 (also RAID 1) and the contents of /dev/mapper/lvmt_containers1-lvmt_containers1 are also backed up to /dev/mapper/lvmt_storage1-lvmt_storage1.
What do I need to do to exclude the swapfile? I am under the impression that nothing is actually being excluded, as /dev/mapper/lvmt_storage1-lvmt_storage1 and /zfs_containers2 are still empty. The only reason I know the swapfile is being included is because it takes a minute to compress the 32GB before backing it up.
Workaround, if any: None that I am aware of
Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
The text was updated successfully, but these errors were encountered: