diff --git a/HISTORY b/HISTORY index 9714c186..d6458744 100644 --- a/HISTORY +++ b/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 diff --git a/cmdline/elem.c b/cmdline/elem.c index 46acb0d1..da0e1ca8 100644 --- a/cmdline/elem.c +++ b/cmdline/elem.c @@ -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); diff --git a/cmdline/state.c b/cmdline/state.c index fe228260..88ac9271 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -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); diff --git a/snapraid.1 b/snapraid.1 index 18d34ef9..ba98e2b9 100644 --- a/snapraid.1 +++ b/snapraid.1 @@ -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. diff --git a/snapraid.d b/snapraid.d index b9c4e804..6b3843a4 100644 --- a/snapraid.d +++ b/snapraid.d @@ -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. diff --git a/snapraid.txt b/snapraid.txt index efddfe21..05c009d4 100644 --- a/snapraid.txt +++ b/snapraid.txt @@ -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 =========