So far what we were doing was to compress the directory, ftp pass it to the destination, where you decompress. In In Windows Some of the time was spent in Linux and some (by now most) the step in Windows 7. In Linux, rsync is usually available by default. In Windows, you have to install it. I installed
cwrsync , which is free and provides a rsync command compatible with the original, for use in console.
After installation, check that the folder was in the PATH cwrsync (Control Panel, System and Security, System, Advanced System Settings, Environment Variables, System Variables, PATH). I had to do it manually. Problem
Git It may be that by using rsync will see an error message like this:
rsync: connection unexpectedly closed (0 bytes Received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c (601) [Receive
r = 3.0.7]
It took several hours to find
here could be that Git provides a version of an executable that cwrsync is taking place should be. To fix this, just go to PATH and put
Git directory after directory cwrsyncBefore:
. For example, in my case:
C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ Windows Live, C: \\ Program Files (x86) \\ Common Files \\ Microsoft Shared \\ Windows Live;% SystemRoot% \\ system32;% SystemRoot%,% SystemRoot% \\ System32 \\ Wbem;% SYSTEMROOT% \\ System32 \\ WindowsPowerShell \\ v1.0 \\;% JAVA_HOME% \\ bin, C: \\ bin \\ dev \\ xampp \\ php, C: \\ bin \\ system \\ GNUWin; C: \\ bin \\ dev \\ drush; C: \\ Program Files (x86) \\ Graphics \\ Graphviz2.26.3 \\ bin, C: \\ Program Files (x86) \\ Windows Live \\ Shared, C: \\ Program Files (x86) \\ QuickTime \\ QTSystem \\; C: \\ Python26; C: \\ Program Files (x86) \\ Dev \\ Git \\ cmd: C: \\ Program Files (x86) \\ Dev \\ Git \\ bin ;
C: \\ Program Files (x86) \\ cwRsync \\ bin
After: C: \\ Program Files \\ Common Files \\ Microsoft Shared \\ Windows Live, C: \\ Program Files (x86) \\ Common Files \\ Microsoft Shared \\ Windows Live;% SystemRoot% \\ system32;% SystemRoot%,% SystemRoot% \\ System32 \\ Wbem;% SYSTEMROOT% \\ System32 \\ WindowsPowerShell \\ v1 .0 \\;% JAVA_HOME% \\ bin, C: \\ bin \\ dev \\ xampp \\ php, C: \\ bin \\ system \\ GNUWin; C: \\ bin \\ dev \\ drush; C: \\ Program Files (x86) \\ Graphics \\ Graphviz2.26.3 \\ bin, C: \\ Program Files (x86) \\ Windows Live \\ Shared, C: \\ Program Files (x86) \\ QuickTime \\ QTSystem \\; C: \\ Python26; C: \\ Program Files (x86) \\ cwRsync \\ binC: \\ Program Files (x86) \\ Dev \\ Git \\ cmd: C: \\ Program Files (x86) \\ Dev \\ Git \\ bin
;
But now Git is the one that shows an error message when running (although, apparently, makes good action anyway).
incorrect parameter format: active:
Well, at least we know the cause and can make the PATH git ara is right on a console, and rsync to another. For the moment, to find a better solution to this. Testing locally
Personally, it can be difficult to find simple examples to help us startwith rsync. After walking a bit lost in the subject, I went
this article.
A simple test is:
rsync-a source destination
This copies the source directory into destination
.
rsync-a source /.
destination
This will copy the contents of the source directory into destination .
-a is the simple way-rlptgoD (non-H) and is supposed to work well for the usual case, that is to make backups of origin on arrival.
is recommended to use-v for verbose (more information about what you are doing the command, place-v,-vv,-vvv, etc. depending on how much detail you want).
There are several options available for the command.
- delete allows the removal of target those things that are no longer at the origin. Use with caution. Something I noticed with - delete is not the same make
rsync - delete-a source / * destination
that rsync - delete-a source /.
destination
In the first case, using *, there is no elimination. In the second case, using., It works as expected. Remote Destination
What I want is to copy a directory to a remote server.This can be done with:
rsync-a source /. username @ hostname: path / to
try to backup rsync using SSH, asking for the password.
there a way to configure ssh to do with the authentication keys, but I managed to work me so far.
Some recommended options for the command used for remote copies is:
- progress, you can see the progress of the operation-e ssh, which allows state explicitly using ssh
-z, which lets you use a tablet trip which is copied
Thus, the command to synchronize two directories (including deletions) becomes something like:
rsync - progress - delete-avze ssh source /. username @ hostname: path / to
Next Steps
That
use ssh keys to avoid having to be typing password every time.drush Use rsync. References
- The rsync algorithm: The problem
0 comments:
Post a Comment