Este conteúdo não está disponível no idioma selecionado.
14.3. Tracking Changes Between Snapper Snapshots
Use the
status, diff, and xadiff commands to track the changes made to a subvolume between snapshots:
- status
- The
statuscommand shows a list of files and directories that have been created, modified, or deleted between two snapshots, that is a comprehensive list of changes between two snapshots. You can use this command to get an overview of the changes without excessive details.For more information, see Section 14.3.1, “Comparing Changes with thestatusCommand”. - diff
- The
diffcommand shows a diff of modified files and directories between two snapshots as received from thestatuscommand if there is at least one modification detected.For more information, see Section 14.3.2, “Comparing Changes with thediffCommand”. - xadiff
- The
xadiffcommand compares how the extended attributes of a file or directory have changed between two snapshots.For more information, see Section 14.3.3, “Comparing Changes with thexadiffCommand”.
14.3.1. Comparing Changes with the status Command Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The
status command shows a list of files and directories that have been created, modified, or deleted between two snapshots.
To display the status of files between two snapshots, use:
snapper -c config_file status first_snapshot_number..second_snapshot_number
# snapper -c config_file status first_snapshot_number..second_snapshot_number
Use the
list command to determine snapshot numbers if needed.
For example, the following command displays the changes made between snapshot 1 and 2, using the configuration file
lvm_config.
Read letters and dots in the first part of the output as columns:
+..... /lvm_mount/file3 |||||| 123456
+..... /lvm_mount/file3
||||||
123456
Column 1 indicates any modification of the file (directory entry) type. Possible values are:
Column 1
| Output | Meaning |
|---|---|
| . | Nothing has changed. |
| + | File created. |
| - | File deleted. |
| c | Content changed. |
| t | The type of directory entry has changed. For example, a former symbolic link has changed to a regular file with the same file name. |
Column 2 indicates any changes in the file permissions. Possible values are:
Column 2
| Output | Meaning |
|---|---|
| . | No permissions changed. |
| p | Permissions changed. |
Column 3 indicates any changes in the user ownership. Possible values are:
Column 3
| Output | Meaning |
|---|---|
| . | No user ownership changed. |
| u | User ownership has changed. |
Column 4 indicates any changes in the group ownership. Possible values are:
Column 4
| Output | Meaning |
|---|---|
| . | No group ownership changed. |
| g | Group ownership has changed. |
Column 5 indicates any changes in the extended attributes. Possible values are:
Column 5
| Output | Meaning |
|---|---|
| . | No extended attributes changed. |
| x | Extended attributes changed. |
Column 6 indicates any changes in the access control lists (ACLs). Possible values are:
Column 6
| Output | Meaning |
|---|---|
| . | No ACLs changed. |
| a | ACLs modified. |
14.3.2. Comparing Changes with the diff Command Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The
diff command shows the changes of modified files and directories between two snapshots.
snapper -c config_name diff first_snapshot_number..second_snapshot_number
# snapper -c config_name diff first_snapshot_number..second_snapshot_number
Use the
list command to determine the number of the snapshot if needed.
For example, to compare the changes made in files between snapshot 1 and snapshot 2 that were made using the
lvm_config configuration file, use:
This output shows that
file4 had been modified to add "words" into the file.
14.3.3. Comparing Changes with the xadiff Command Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The
xadiff command compares how the extended attributes of a file or directory have changed between two snapshots:
snapper -c config_name xadiff first_snapshot_number..second_snapshot_number
# snapper -c config_name xadiff first_snapshot_number..second_snapshot_number
Use the
list command to determine the number of the snapshot if needed.
For example, to show the xadiff output between snapshot number 1 and snapshot number 2 that were made using the
lvm_config configuration file, use:
snapper -c lvm_config xadiff 1..2
# snapper -c lvm_config xadiff 1..2