lunes, 13 de octubre de 2008

HoboCopy - Copiar archivos en uso

Como parte de una inquietud personal este fin de semana busqué algún utilitario que permitiera copiar archivos aún cuando estuviesen en uso, descubrí que era algo bastante difícil y al menos a mí se me complicó para encontrar lo que necesitaba.

Hasta que por fin me tope con HoboCopy, este utilitario usa el Volume Shadow Service (VSS) para tomar una imagen del disco antes de copiar y es perfecto para copiar archivos en uso.

La desventaja de esto es la evidente, que se puede copiar un archivo inconsistente sino se tiene cuidado, pero para lo que yo lo necesitaba era perfecto porque sabía cuando los archivos estaban completos.

Lo más interesante fue enterarme de que hay programas como SQL Server 2005 que son VSS-aware, por lo que se graba en disco un estado consistente de los archivos antes de que se realice la vista y puede permitir backups en vivo de los datos.



hobocopy [/statefile=FILE] [/verbosity=LEVEL] [ /full | /incremental ]
[ /clear ] [ /skipdenied ] [ /y ] [ /simulate ] [/recursive]
<src> <dest> [<file> [<file> [ ... ] ]

Recursively copies a directory tree from <src> to <dest>.

/statefile - Specifies a file where information about the copy will
be written. This argument is required when /incremental
is specified, as the date and time of the last copy is
read from this file to determine which files should be
copied.

/verbosity - Specifies how much information HoboCopy will emit
during copy. Legal values are: 0 - almost no
information will be emitted. 1 - Only error information
will be emitted. 2 - Errors and warnings will be
emitted. 3 - Errors, warnings, and some status
information will be emitted. 4 - Lots of diagnostic
information will be emitted. The default level is 2.

/full - Perform a full copy. All files will be copied
regardless of modification date.

/incremental - Perform an incremental copy. Only files that have
changed since the last full copy will be copied.
Specifying this switch requires the /statefile switch
to be specified, as that's where the date of the last
full copy is read from.

/clear - Recursively delete the destination directory before
copying. HoboCopy will ask for confirmation before
deleting unless the /y switch is also specified.

/skipdenied - By default, if HoboCopy does not have sufficient
privilege to copy a file, the copy will fail with an
error. When the /skipdenied switch is specified,
permission errors trying to copy a source file result
in the file being skipped and the copy continuing.

/y - Instructs HoboCopy to proceed as if user answered yes
to any confirmation prompts. Use with caution - in
combination with the /clear switch, this switch will
cause the destination directory to be deleted without
confirmation.

/simulate - Simulates copy only - no snapshot is taken and no copy
is performed.

/recursive - Copies subdirectories (including empty ones). Shortcut: /r

<src> - The directory to copy (the source directory).
<dest> - The directory to copy to (the destination directory).
<file> - A file (e.g. foo.txt) or filespec (e.g. *.txt) to copy.
Defaults to *.*.

5 comentarios:

  1. no entendí ni jota pa que sirve, jejej será que de eso no entiendo nada, podrías ponerlo en otro idioma más simple para los mortales jejejeje ;-D
    saludos

    ResponderEliminar
  2. Jajajajajjajaja… perdoná… es fácil, si un día queres copiar un archivo en la computadora y te dice que no se puede porque otro programa lo tiene abierto, entonces, recién ahí te puede servir.

    Probablemente no lo necesites nunca si no andas tratando de copiar archivos que se supone que no debería poder copiar (como es mi caso) ;)

    Abrazo

    ResponderEliminar
  3. jejejeje, se comprende no es mi palo como últimamente se dice.

    ResponderEliminar
  4. Justo lo que estaba buscando!!
    Me viene al pelo para no tener que andar cerrando la conexion entre el archivo de la BD de SQL SERVER 2005 y el VS cada vez que quiero copiarla a otro lado :D...

    Bueno sí,ya se que no demoro ni 2 seg abriendo una conexión de nuevo pero yo respeto la "ley del mínimo esfuerzo" jaja

    ResponderEliminar