Chapter 16. Incremental Backup Assistance using Glusterfind
Chapter 16. Incremental Backup Assistance using Glusterfind
Glusterfind is a utility that provides the list of files that are modified between the previous backup session and the current period. The commands can be executed at regular intervals to retrieve the list. Multiple sessions for the same volume can be present for different use cases. The changes that are recorded are, new file/directories, data/metadata modifications, rename, and deletes.
The following is the list configuration options available in Glusterfind:
Glusterfind Create
Glusterfind Pre
Glusterfind Post
Glusterfind List
Glusterfind Delete
Note
All the glusterfind configuration commands such as, glusterfind pre, glusterfind post, glusterfind list, and glusterfind delete for a session have to be executed only on the node on which session is created.
Glusterfind Create
To create a session for a particular instance in the volume, execute the following command:
Copy to ClipboardCopied!Toggle word wrapToggle overflow
where,
--disable-partial: Disables the partial-find feature that is enabled by default.
--output-prefix OUTPUT_PREFIX: Prefix to the path/name that is specified in the outfile.
--regenerate-outfile: Regenerates a new outfile and discards the outfile generated from the last pre command.
--no-encode: The file paths are encoded by default in the output file. This option disables encoding of file paths.
--help OR -h: Displays help for the command
session: Unique name of a session.
volname: Name of the volume for which the pre command is executed.
outfile: Incremental list of modified files.
For example:
glusterfind pre sess_vol1 vol1 /tmp/outfile.txt
# glusterfind pre sess_vol1 vol1 /tmp/outfile.txt
Generated output file /tmp/outfile.txt
Copy to ClipboardCopied!Toggle word wrapToggle overflow
Note
The output format is <TYPE> <PATH1> <PATH2>. Possible type values are, NEW, MODIFY, DELETE and RENAME. PATH2 is applicable only if type is RENAME. For example:
NEW file1
NEW dir1%2Ffile2
MODIFY dir3%2Fdir4%2Ftest3
RENAME test1 dir1%2F%2Ftest1new
DELETE test2
NEW file1
NEW dir1%2Ffile2
MODIFY dir3%2Fdir4%2Ftest3
RENAME test1 dir1%2F%2Ftest1new
DELETE test2
Copy to ClipboardCopied!Toggle word wrapToggle overflow
The example output with --no-encode option
NEW file1
NEW dir1/file2
MODIFY dir3/dir4/test3
RENAME test1 dir1/test1new
DELETE test2
NEW file1
NEW dir1/file2
MODIFY dir3/dir4/test3
RENAME test1 dir1/test1new
DELETE test2
Copy to ClipboardCopied!Toggle word wrapToggle overflow
Glusterfind Post:
The following command is run to update the session time:
glusterfind post [-h] [--debug] <SessionName> <volname>
# glusterfind post [-h] [--debug] <SessionName> <volname>
Copy to ClipboardCopied!Toggle word wrapToggle overflow
where,
SessionName: Unique name of a session.
volname: Name of the volume for which the post command is executed.
For example:
glusterfind post sess_vol1 vol1
# glusterfind post sess_vol1 vol1
Session sess_vol1 with volume vol1 updated
Copy to ClipboardCopied!Toggle word wrapToggle overflow
Glusterfind List:
To list all the active sessions and the corresponding volumes present in the cluster, execute the following command:
glusterfind list [-h] [--session SESSION] [--volume VOLUME] [--debug]
# glusterfind list [-h] [--session SESSION] [--volume VOLUME] [--debug]
Copy to ClipboardCopied!Toggle word wrapToggle overflow
where,
--session SESSION: Displays the information related to that session
--volume VOLUME: Displays all the active sessions corresponding to that volume
--help OR -h: Displays help for the command
For example:
glusterfind list
# glusterfind list
SESSION VOLUME SESSION TIME
--------------------------------------------------
sess_vol1 vol1 2015-06-22 22:22:53
Copy to ClipboardCopied!Toggle word wrapToggle overflow
Glusterfind Delete:
To clear out all the session information associated with that particular session, execute the following command:
Ensure, no further backups are expected to be taken in a particular session.
When a new brick is added or an existing brick is replaced, execute the glusterfind create command with force for the existing session to work. For example:
We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.
Making open source more inclusive
Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.
About Red Hat
We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.