Skip to content

Commit 59ac34d

Browse files
johanR04johanr001buhtz
authored
doc(faq): Add entry about how rsync handles open files
Thank you to Johan Risberg (@johanR04) for this contribution. Close #1381 --------- Co-authored-by: Johan Risberg <[email protected]> Co-authored-by: Christian Buhtz <[email protected]>
1 parent 3bdad8c commit 59ac34d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

FAQ.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ General Public License v2 (GPLv2). See LICENSES directory or go to
3333
* [What happens when I remove a backup?](#what-happens-when-i-remove-a-backup)
3434
* [How can I exclude cache folders to improve backup speed and reduce storage?](#how-can-i-exclude-cache-folders-to-improve-backup-speed-and-reduce-storage)
3535
* [How to use extended filesystem attributes (xattr) to exclude files/directories?](#how-to-use-extended-filesystem-attributes-xattr-to-exclude-filesdirectories)
36+
* [How does Back In Time handle open or changed files during backup?](#how-does-back-in-time-handle-open-or-changed-files-during-backup)
3637
- [Restore](#restore)
3738
* [After Restore I have duplicates with extension ".backup.20131121"](#after-restore-i-have-duplicates-with-extension-backup20131121)
3839
* [Back In Time doesn't find my old backups on my new Computer](#back-in-time-doesnt-find-my-old-backups-on-my-new-computer)
@@ -530,6 +531,46 @@ If you encounter clear rules about configuring Samba that it works with
530531
_Back In Time_ in a reliable way, please let us know the details. We will than
531532
integrate it into the documentation.
532533

534+
## How does _Back in Time_ handle open or changed files during backup?
535+
536+
**Explanation**
537+
538+
Back In Time uses rsync to copy the files and directories specified to be
539+
backed up in the configuration. Rsync does not lock any files that are open
540+
or being modified and therefore the backup can be copied in an inconsistent
541+
state. Rsync only reads a file on time when it goes through it and as a result
542+
of this only some changes are captured by rsync. This can affect files such as
543+
logs, browser caches, databases or virtual machine images where inconsistencies
544+
can even lead to data corruption.
545+
546+
**To reduce this risk, the following approaches can be considered:**
547+
548+
- **Filesystem snapshots**
549+
If using a filesystem like btrfs and ZFS that has a snapshot function this
550+
can be used together with Back in Time. Filesystem snapshots provide a
551+
read-only copy of a filesystem frozen at a specific point in time, which
552+
ensures data integrity even for open/changing files. Configure Back In Time
553+
to backup from this filesystem's read-only snapshot.
554+
555+
- **Use exclusions**
556+
If the filesystem does not have filesystem snapshots available, one
557+
solution could be to exclude files that are frequently open or actively
558+
changing. The command `lsof` in GNU/Linux presents open files and the
559+
processes that opened them as a list. Use this list as base for
560+
configuring BIT exclusion list.
561+
562+
- **Application specific handling**
563+
For applications that opens and modifies files frequently like databases
564+
or virtual machines, specific solutions may be needed. Use the databases
565+
own backup function to create a consistent copy and include that in the
566+
BIT backup. Virtual machines products typically have ability to create
567+
snapshots of their state, that can be included in BIT.
568+
569+
- **Choose when to perform backup**
570+
Perform backup at times where less files are open, for example at night.
571+
572+
573+
533574
# Restore
534575

535576
## After Restore I have duplicates with extension ".backup.20131121"

0 commit comments

Comments
 (0)