Step between --dry-run and running? - Tools

This is a discussion on Step between --dry-run and running? - Tools ; Hi, Is there either a step, or a recipe for a step between --dry-run and actually running? In a particular instance, --dry-run isn't enough. I want to actually attempt to read the entire file in, but then write it out ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Step between --dry-run and running?

  1. Step between --dry-run and running?

    Hi,

    Is there either a step, or a recipe for a step between
    --dry-run and actually running?

    In a particular instance, --dry-run isn't enough. I want
    to actually attempt to read the entire file in, but then write
    it out to nowhere. I'm trying to see if it generates any disk
    errors that may hurt during an actual transfer. I realize 2
    minutes later I could do the read again for the real transfer
    and it would fail, but I'm hoping there is an incredibly slim
    chance thats the case.

    The reason I want to do this is that I'm trying to
    capture if/when there are read errors on the sending disk.
    I've ended up with corrupt files and didn't know until it
    was too late. (NOTE: This last happened to me in 2003 with
    "rsync version 2.5.6 protocol version 26" . My concerns
    may be totally unfounded since then, and if so I'm sorry
    but please let me know. I've used rsync pretty much weekly
    since then, and haven't run into the problem, but then again
    I haven't had a disk fail that I didn't know prior)

    Thanks, Tuc
    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


  2. Re: Step between --dry-run and running?

    On Sat, 2008-05-31 at 14:35 -0400, Tuc at T-B-O-H.NET wrote:
    > Is there either a step, or a recipe for a step between
    > --dry-run and actually running?
    >
    > In a particular instance, --dry-run isn't enough. I want
    > to actually attempt to read the entire file in, but then write
    > it out to nowhere. I'm trying to see if it generates any disk
    > errors that may hurt during an actual transfer.


    That would be --only-write-batch.

    Matt

    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkhBw6MACgkQC+xSYN/RlfvEIQCffADBKXODgHr9HVRGE/dT6Bc+
    J1sAnR2N9H3fhvjviGHtvhBrOHFcxvZO
    =WUsV
    -----END PGP SIGNATURE-----


  3. Re: Step between --dry-run and running?

    > On Sat, 2008-05-31 at 14:35 -0400, Tuc at T-B-O-H.NET wrote:
    > > Is there either a step, or a recipe for a step between
    > > --dry-run and actually running?
    > >=20
    > > In a particular instance, --dry-run isn't enough. I want
    > > to actually attempt to read the entire file in, but then write
    > > it out to nowhere. I'm trying to see if it generates any disk
    > > errors that may hurt during an actual transfer.

    >
    > That would be --only-write-batch.
    >

    Hrm, so it does.... But creates a $FILE.sh filename. Any
    way to prevent that part? Also, should running it twice in a row
    quickly produce 2 files that should diff the same, or is something
    stored in there that would prevent a diff from being the same?
    (Timestamp, etc)

    Thanks, Tuc
    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


  4. Re: Step between --dry-run and running?

    On Sat, 2008-05-31 at 18:16 -0400, Tuc at T-B-O-H.NET wrote:
    > > That would be --only-write-batch.

    >
    > Hrm, so it does.... But creates a $FILE.sh filename. Any
    > way to prevent that part?


    No. If you don't want the $FILE.sh, just delete it.

    > Also, should running it twice in a row
    > quickly produce 2 files that should diff the same, or is something
    > stored in there that would prevent a diff from being the same?
    > (Timestamp, etc)


    There is one thing that impedes reproducibility of batch files: rsync
    uses the current time as a seed for the delta-transfer algorithm so that
    delta-transfer corruptions won't occur repeatedly for the same file. If
    you specify your own seed with --checksum-seed and nothing in the source
    or destination changes, then the batch files should be identical.

    Matt

    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkhCwAcACgkQC+xSYN/RlftMEACaA2hxv6dbLwipGUbHFfIFDapi
    89cAn0n2hGpQKLjGIkIFjPztBBoL3Qtc
    =YfAv
    -----END PGP SIGNATURE-----


  5. Re: Step between --dry-run and running?

    >
    > On Sat, 2008-05-31 at 18:16 -0400, Tuc at T-B-O-H.NET wrote:
    > > > That would be --only-write-batch.

    > > =20
    > > Hrm, so it does.... But creates a $FILE.sh filename. Any
    > > way to prevent that part?

    >
    > No. If you don't want the $FILE.sh, just delete it.
    >


    It needs to be able to write it first......

    FreeBSD:

    himinbjorg# touch /dev/null.sh
    touch: /dev/null.sh: Operation not supported

    Not so good, but......

    Linux:
    [root@ports ~]# touch /dev/null.sh
    [root@ports ~]# ls -l /dev/null.sh
    -rw-r--r-- 1 root root 0 Jun 1 13:13 /dev/null.sh

    Thats ok... The first system I need to
    implement it on is a Linux, so I guess it won't be an
    issue, but the next is a FreeBSD.. Maybe if I just do :

    himinbjorg# ln -s /dev/null b
    himinbjorg# ls -l b
    lrwxr-xr-x 1 root wheel 9 Jun 1 13:16 b -> /dev/null
    himinbjorg# cat /boot/kernel >b
    himinbjorg# ls -l b
    lrwxr-xr-x 1 root wheel 9 Jun 1 13:16 b -> /dev/null

    That way its not inside the /dev directory...
    I don't know if rsync does anything special with the
    file presented in --only-write-batch, but if it just
    opens for write, then shouldn't be an issue.

    > > Also, should running it twice in a row
    > > quickly produce 2 files that should diff the same, or is something
    > > stored in there that would prevent a diff from being the same?
    > > (Timestamp, etc)

    >
    > There is one thing that impedes reproducibility of batch files: rsync
    > uses the current time as a seed for the delta-transfer algorithm so that
    > delta-transfer corruptions won't occur repeatedly for the same file. If
    > you specify your own seed with --checksum-seed and nothing in the source
    > or destination changes, then the batch files should be identical.
    >

    Ok. I wasn't looking for identical, just a reason why. Thats a
    "reason why" in my book.

    Thanks for all the help!

    Tuc
    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


  6. Re: Step between --dry-run and running?

    On Sun, 2008-06-01 at 13:18 -0400, Tuc at T-B-O-H.NET wrote:
    > >
    > > On Sat, 2008-05-31 at 18:16 -0400, Tuc at T-B-O-H.NET wrote:
    > > > > That would be --only-write-batch.
    > > > =20
    > > > Hrm, so it does.... But creates a $FILE.sh filename. Any
    > > > way to prevent that part?

    > >
    > > No. If you don't want the $FILE.sh, just delete it.
    > >

    >
    > It needs to be able to write it first......


    Right...

    > FreeBSD:
    >
    > himinbjorg# touch /dev/null.sh
    > touch: /dev/null.sh: Operation not supported
    >
    > Not so good, but......
    >
    > Linux:
    > [root@ports ~]# touch /dev/null.sh
    > [root@ports ~]# ls -l /dev/null.sh
    > -rw-r--r-- 1 root root 0 Jun 1 13:13 /dev/null.sh
    >
    > Thats ok... The first system I need to
    > implement it on is a Linux, so I guess it won't be an
    > issue, but the next is a FreeBSD.. Maybe if I just do :
    >
    > himinbjorg# ln -s /dev/null b
    > himinbjorg# ls -l b
    > lrwxr-xr-x 1 root wheel 9 Jun 1 13:16 b -> /dev/null
    > himinbjorg# cat /boot/kernel >b
    > himinbjorg# ls -l b
    > lrwxr-xr-x 1 root wheel 9 Jun 1 13:16 b -> /dev/null
    >
    > That way its not inside the /dev directory...
    > I don't know if rsync does anything special with the
    > file presented in --only-write-batch, but if it just
    > opens for write, then shouldn't be an issue.


    That's precisely what I would have suggested. Rsync just opens the
    batch file for writing.

    Matt

    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkhC3RwACgkQC+xSYN/RlfvcjACeJbcP6k/fMCvNyX9eVUSp3flo
    yp0Anj7XE41uCxq3XRlabuyHc+D1Lgbf
    =urn1
    -----END PGP SIGNATURE-----


+ Reply to Thread