mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-25 18:40:19 -04:00
Removes the new .backup feature.
I'm not yet convinced that it's a good idea, because it may end in unexpected errors if the old content file is used as it's it.
This commit is contained in:
parent
5dfc67ec18
commit
03fc05e93c
6 changed files with 8 additions and 14 deletions
2
HISTORY
2
HISTORY
|
|
@ -5,8 +5,6 @@ SnapRAID HISTORY
|
|||
=================
|
||||
* The -N, --force-nocopy option now also works if you used previously
|
||||
"sync" commands without it.
|
||||
* When saving the content file keep a copy of the previos one adding
|
||||
the ".backup" extension.
|
||||
* Added a new -F, --force-full option that forces a full sync reusing
|
||||
the hash data present in the content file.
|
||||
This may be useful when using an old content file like the backup
|
||||
|
|
|
|||
|
|
@ -299,10 +299,12 @@ int filter_content(tommy_list* contentlist, const char* path)
|
|||
if (pathcmp(tmp, path) == 0)
|
||||
return -1;
|
||||
|
||||
#if USE_BACKUP
|
||||
/* exclude also the ".backup" copy */
|
||||
pathprint(tmp, sizeof(tmp), "%s.backup", content->content);
|
||||
if (pathcmp(tmp, path) == 0)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
/* exclude also the ".lock" file */
|
||||
pathprint(tmp, sizeof(tmp), "%s.lock", content->content);
|
||||
|
|
|
|||
|
|
@ -4115,6 +4115,8 @@ void state_write(struct snapraid_state* state)
|
|||
while (i) {
|
||||
struct snapraid_content* content = i->data;
|
||||
char tmp[PATH_MAX];
|
||||
|
||||
#ifdef USE_BACKUP
|
||||
char backup[PATH_MAX];
|
||||
|
||||
/* if the content file was checked reading it, it's a good candidate */
|
||||
|
|
@ -4131,6 +4133,7 @@ void state_write(struct snapraid_state* state)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* now renames the just written copy with the correct name */
|
||||
pathprint(tmp, sizeof(tmp), "%s.tmp", content->content);
|
||||
|
|
|
|||
|
|
@ -836,7 +836,7 @@ This option can be used only with the \[dq]sync\[dq] command.
|
|||
.B \-F, \-\-force\-full
|
||||
In the \[dq]sync\[dq] command, forces a full rebuild of the parity.
|
||||
This option can be used when you reverted back to an old content
|
||||
file, like the backup one, and you still have the parity data.
|
||||
file, and you still have the parity data.
|
||||
Instead of recomputing the parity from scratch, this allows
|
||||
to reuse the hashes present in the content file to validate data,
|
||||
and to maintain data protection during the \[dq]sync\[dq] process using
|
||||
|
|
@ -1403,9 +1403,6 @@ with all the checksums to verify their integrity.
|
|||
.PP
|
||||
This file is read and written by the \[dq]sync\[dq] and \[dq]scrub\[dq] commands, and
|
||||
read by \[dq]fix\[dq], \[dq]check\[dq] and \[dq]status\[dq].
|
||||
.PP
|
||||
When saving a new copy, the previous one is renamed adding the \[dq].backup\[dq]
|
||||
extension.
|
||||
.SH PARITY
|
||||
SnapRAID stores the parity information of your array in the parity
|
||||
files.
|
||||
|
|
|
|||
|
|
@ -599,7 +599,7 @@ Options
|
|||
-F, --force-full
|
||||
In the "sync" command, forces a full rebuild of the parity.
|
||||
This option can be used when you reverted back to an old content
|
||||
file, like the backup one, and you still have the parity data.
|
||||
file, and you still have the parity data.
|
||||
Instead of recomputing the parity from scratch, this allows
|
||||
to reuse the hashes present in the content file to validate data,
|
||||
and to maintain data protection during the "sync" process using
|
||||
|
|
@ -1022,9 +1022,6 @@ Content
|
|||
This file is read and written by the "sync" and "scrub" commands, and
|
||||
read by "fix", "check" and "status".
|
||||
|
||||
When saving a new copy, the previous one is renamed adding the ".backup"
|
||||
extension.
|
||||
|
||||
Parity
|
||||
SnapRAID stores the parity information of your array in the parity
|
||||
files.
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ SnapRAID provides the following options:
|
|||
-F, --force-full
|
||||
In the "sync" command, forces a full rebuild of the parity.
|
||||
This option can be used when you reverted back to an old content
|
||||
file, like the backup one, and you still have the parity data.
|
||||
file, and you still have the parity data.
|
||||
Instead of recomputing the parity from scratch, this allows
|
||||
to reuse the hashes present in the content file to validate data,
|
||||
and to maintain data protection during the "sync" process using
|
||||
|
|
@ -1105,9 +1105,6 @@ with all the checksums to verify their integrity.
|
|||
This file is read and written by the "sync" and "scrub" commands, and
|
||||
read by "fix", "check" and "status".
|
||||
|
||||
When saving a new copy, the previous one is renamed adding the ".backup"
|
||||
extension.
|
||||
|
||||
|
||||
11 PARITY
|
||||
=========
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue