Eh? Why would having a file open hinder backups at all?
Prevents access to the file, so it's missing from the backup.
No, it does not. Nothing prevents you from reading a file, even if it is being executed/mapped/accessed by another process. Whatever gave you that idea?
I do know that
Windows prevents one from deleting or renaming files being executed, but Linux has no such limitations. The one limitation is you cannot open an executable for writing if it is being executed right now; but you can open it for reading, and delete and rename it just fine.
Also, if you want snapshots, just use LVM2
Is there a backup util that replicates the Reflect features, whatever the underlying details? Every time I ask there appears not to be.
I don't know, because I do not know what features Reflect provides.
Besides, I've never used "backup utils" in Linux. It is so simple stuff (to me), that I just set up whatever is convenient on each machine for me. I spend more time thinking about what kind of backup policy is needed and works best, than implementing it.
(On one server, running a black-box Java application, reverse-cached to open internet using Apache, I used a script that polled the number of active TCP connections to the server during the backup time window each night, moving the snapshot forwards every time there were fewer users; and then just tarred the entire dataset off the snapshot to a backup machine for a daily
stable snapshot. I had a pair of identical servers in a rack, also connected directly to each other using fixed IP addresses.)
The fact that you're looking for a "backup util", also means that you're looking for someone else to worry about the policy details for you. It's not how Linux works, is all.
I think you've just found a set of tools you like.
I would hardly use every day a set of tools I disliked! (Hence why I am not on W10, of course.)
But you could also look at it as discovering the electric kettle when everyone raves about making a cuppa on a camp fire. That would be 'just a tool I like', wouldn't it?
I don't know, because I don't quite get the analogy there. (I'm being serious, not snarky here. If you detect any kind of snarkiness in my tone in this or my previous message, please let me know and I'll try to reword to delete such unwanted undertones.)
The way I see it, is that Linux is like a raw, modular kit of tools, whereas Windows and macOS are polished toolcarts. There is nothing wrong in preferring to use a good toolcart;
they work. But judging Linux based on what kind of toolcart modules (readymade utilities) it has available, is like rating a car based on how well it drives on two wheels. That's not what it is for.
Just don't go spreading lies about what "Linux cannot do"
Believe me, I would be deliriously happy if someone would come along and show Linux doing those things, because then I would really consider jumping ship. The backup is the major road hump at the moment (well, since forever really), and if there were a simple util that replicated Reflect that would go a looooong way. There is a company (Terrabyte) that makes a similar tool for Windows and Linux, but the Linux version cannot make an image while the OS is running. Since they surely know what they are doing (the Windows version does it, and they used to even manage it without the Windows shadow copy thing) I have to assume that there is some reason why it isn't possible and, as I keep pointing out, no-one has shown me that it is possible.
There being a ready-made utility for it is completely different to it being possible. You're assuming that the lack of an utility means the lack of capability. This is the core untruth here.
I recommend you take a look at the
KernelTalks How-to guide: LVM snapshot.
To set up LVM, instead of accessing storage devices and their partitions directly, we assign them to one or more LVM
Volume Groups. (A VG can span devices, which can be very useful if you're running out of space on one.)
In each Volume Group, we can create Logical Volumes. You create one LV for each filesystem you want to use. (I typically use one for /boot, one for operating system, one for /home (user home directories), and on a dedicated server, one for the service data (/data or /var/data or wherever is applicable). Each LV looks very much like a storage device partition to the user, and are formatted and used exactly like partitions are.
The key thing here is to not use all of the space on the Volume Group for the Logical Volumes. Whenever we create a snapshot of a LV (and thus the filesystem in it), unused space in the Volume Group is used to store the divergence between the snapshot and the Logical Volume it was taken from. (In thick provisioning, we use the unallocated parts of the Volume Group; in thin provisioning, the unused blocks in the Logical Volumes on that Volume Group too –– very much like memory overcommit.) We can always add more space to the Volume Group by adding another storage device to it, though.
This is the first design issue that one must carefully consider when installing a Linux distribution on their machines, if they intend to use LVM snapshots. What is the provisioning policy to be used? No easy answers, no rules of thumb really (except "20% is a good number"). This is the stuff the most experienced Linux sysadmins talk shop about when relaxing and having favourite beverages with colleagues.
It becomes even more complicated when you do odd stuff like Raid-0 and Raid-1 on different storage devices for added throughput or redundancy. (Yes, I do like the idea of two or four Samsung 980 Pro NVMe drives.) In such cases, using a filesystem that itself provides snapshot capability (btrfs, zfs) can make things simpler –– but even then the backup machinery itself stays logically the same, you just use slightly different commands, and provision for the snapshots in a slightly different manner.
Okay, let's say you have done all this. You have say
/home on an LVM Logical Volume, in a Volume Group with sufficient free/unused space.
To back it up, you create an LVM snapshot, using
lvcreate -L space -s logical-volume-device -n snapshot-name.
The
space is the amount of space needed for the differences between the snapshot, and the original Logical Volume. This, too, is a policy issue, and heavily depends on how much data you expect could be changed on the original Logical Volume during the lifetime of this snapshot.
The original filesystem on that Logical Volume is not impacted at all by this: it does not need to be unmounted, unused, or even idle. It is important that it is in more or less quiescent state for the filesystem snapshot to be useful for us humans –– we want files in their completed state, not in the middle of being modified ––, but it is not a technical requirement at all, just a human one.
The snapshot itself becomes a new Logical Volume. You can treat it as raw partition data (for filesystem imaging), or you can mount it for full, selective, or incremental backupping. You can even mount it read-write!
I myself try to take the snapshot when there are as few applications or users accessing the filesystem as possible. This is to ensure that the snapshot I get is useful to us humans, instead of containing e.g. half-edited versions of files. There is no technical requirement to do so, though. I then mount the snapshot somewhere useful (often I create a temporary directory as a mount point at
/mnt/snapshot/snapshot-name or
/tmp/uacctname-snapshots/snapshot-name), take my sweet time in tarballing the interesting contents (using
nice and
ionice to make sure it does not slow down other processes, since there is no hurry here), and finally unmount and remove the snapshot (
umount mountpoint followed by
lvremove volume-group-device/snapshot-name).
That's all there is to it. The key points are the design choices: using LVM on the storage device, assigning it to a Volume Group; which mount points to make their own filesystems and LVM Logical Volumes; how much space to leave unassigned for in the Volume Group for use by snapshots; and how much space to reserve in each snapshot for the difference between the snapshot and the filesystem it is a snapshot of.
After all that is decided, the backup itself can be a simple dozen-line Bash shell script you trigger automagically by cron/anachron/at. Or you can make it more intelligent, for example keeping a remote storage in sync with the latest snapshot using rsync, or whatever you need.
There are so many options and choices here that I really don't even see how a single utility forcing a specific model on me would be useful. Sure, it'd be useful in the same sense that one of those capsule coffee makers is useful: just drop in a capsule, plug it in, add water, and turn it on to get a cup of coffee. But Linux isn't like that: it isn't a cohesive tool set, but a modular set for you to shape. (It is up to us humans to decide whether that's good or bad: it definitely doesn't work for all. I personally even have a Dolce Gusto capsule coffee maker, but a two-pot Cloer 5548 tea maker!)
Besides, everything really starts at the point you initially install the Linux distribution anyways, because that is when you make the critical design choices. Sure, technically, one can do them afterwards too, but in my experience, it is just faster to save your files and customizations, and reinstall the entire system, and then copy your files and customizations back. I do this about once a year or two anyway, because I choose even my Linux distro based on my workflow at that point in time.
I really do not want this to sound snarky, but just a matter-of-fact casual affirmation: If one is not interested in making such design choices and implementing such stuff themselves, then Linux really isn't well suited for them anyway.
Linux is not, and never will be, simply an alternative to Windows or macOS. Everything that makes Linux powerful for types like myself is the fact that it does not do those design choices for you –– although some software, like gnome and systemd, do insist on their developers being right in doing so. Like so many things in life, that very key facet is a strong point for some, and a fatal weak point for others.
Apologies for the long-ass wall of text.