Skip to content
Snippets Groups Projects
Commit 82a5c55d authored by buczekp's avatar buczekp
Browse files

[LMS-2180] added --checksum to rsync archiver (paranoia check for highest reliability)

SVN: 20654
parent 2080239a
No related branches found
No related tags found
No related merge requests found
...@@ -26,8 +26,12 @@ import ch.systemsx.cisd.common.filesystem.rsync.RsyncCopier; ...@@ -26,8 +26,12 @@ import ch.systemsx.cisd.common.filesystem.rsync.RsyncCopier;
* {@link IPathCopierFactory} that is more reliable than {@link RsyncCopierFactory} when it comes to * {@link IPathCopierFactory} that is more reliable than {@link RsyncCopierFactory} when it comes to
* deciding which files to transfer. {@link IPathCopier} created by {@link RsyncCopierFactory} uses * deciding which files to transfer. {@link IPathCopier} created by {@link RsyncCopierFactory} uses
* "--append" flag causing files that are bigger in destination than in source to be ignored. * "--append" flag causing files that are bigger in destination than in source to be ignored.
* {@link IPathCopier} created by this factory is supposed to ignore only those files that have same * <p>
* sizes and modification times. * {@link IPathCopier} created by this factory will compare a checksum on files to make a decision
* if the files have been changed and are in need of a transfer. The performance of such a check is
* much slower then the default one but with archiving we are concerned mostly about reliability.
*
* @author Piotr Buczek
*/ */
public final class RsyncArchiveCopierFactory implements Serializable, IPathCopierFactory public final class RsyncArchiveCopierFactory implements Serializable, IPathCopierFactory
{ {
...@@ -35,8 +39,7 @@ public final class RsyncArchiveCopierFactory implements Serializable, IPathCopie ...@@ -35,8 +39,7 @@ public final class RsyncArchiveCopierFactory implements Serializable, IPathCopie
public IPathCopier create(File rsyncExecutable, File sshExecutableOrNull) public IPathCopier create(File rsyncExecutable, File sshExecutableOrNull)
{ {
// TODO 2011-04-05, Piotr Buczek: should we use --no-whole-file?
return new RsyncCopier(rsyncExecutable, sshExecutableOrNull, "--archive", "--delete", return new RsyncCopier(rsyncExecutable, sshExecutableOrNull, "--archive", "--delete",
"--inplace"); "--inplace", "--checksum");
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment