Tag Info

New answers tagged

0

The rsync program actually runs a copy of itself on the remote server. Once rsync is running on both ends, they negotiate between themselves how to best transfer the requested files. I don't think it matters which one is started first. However, I would usually initiate the transfer from the machine that is closest to me. That way, if something goes wrong I ...


2

The way rsync algorithm works can be found from here. The algorithm identifies parts of the source file which are identical to some part of the destination file, and only sends those parts which cannot be matched in this way. Effectively, the algorithm computes a set of differences without having both files on the same machine. The algorithm ...


1

The main problem with rsync that it can't continue induvidual files. If you are copying a complex directory structure, it is okay, but if you want to copy for example a single dvd image, it won't be robust. For such cases I use wget. More precisely, wget -c -t 0 http://.... Of course it needs an apache on the client side. If it is impossible, there is a ...


1

I would definitely suggest rsync. I use rsync to copy files anytime I think that the connection has any possibility of being interrupted. If the copy fails, I know I can simply start it again. It's easy to put it in a while loop if you need it to automatically restart until it succeeds.


0

The setup is as follows: The office server has rsync accepting connections over port 873. Portforwarding is setup to route 873 traffic to this server. In /etc/rsyncd.conf a module is added to allow traffic from the production server IP address to a folder on the local server. Iptables is updated to allow traffic for port 873 and 22 from the production ...


1

You may want to add the -P option to your command. From the man page: -P The -P option is equivalent to --partial --progress. Its pur- pose is to make it much easier to specify these two options for a long transfer that may be interrupted. So instead of: sudo rsync -azvv /home/path/folder1/ /home/path/folder2 Do: sudo ...


1

The first time you need to create keys in the private server and share the keys in your office server. You can do it as below. In your private server, perform the following steps. $ ssh-keygen Enter passphrase (empty for no passphrase): Enter same passphrase again: Note: When it asks you to enter the passphrase just press enter key, and do not give any ...


0

I think the only thing you're missing is to initially include all directories leading to the archive dirs, ie. also --include='*/'. This is because excluding a directory (with '*') excludes everything below it rsync --include='*/' --include='**archive/***' --exclude='*' -avzh /xx/inbound/ /yy/inbound Apart from that, you shouldn't need 2 sets of '-avzh'


3

It looks OK. Although why are you using the -z option to compress the transfer? This option is normally used when you are copying to a remote rsync server over a slow network. In this instance it will compress and instantly decompress the files which will only increase your CPU uage with no benefit. The -a (archive) option implies the --progress and -r ...


2

libcurl does not support the rsync protocol. From the libcurl FAQ: Section 3.21 3.21 Protocol xxx not supported or disabled in libcurl When passing on a URL to curl to use, it may respond that the particular protocol is not supported or disabled. The particular way this error message is phrased is because curl doesn't make a distinction ...


1

Here's a simple way that doesn't preserve metadata: ssh server.example.com 'set -C; cat >/path/to/remote/file' </path/to/local/file You can do it with rsync with the right options. The return code will be 0 if the file exists, but you can find out from the verbose output instead. changes=$(rsync -a --ignore-existing --itemize-changes \ ...


-1

Check if the file exists on the remote host first: if ! ssh remotehost [ -f incoming/DB1026910.sql ]; then scp DB1026910.sql remotehost:incoming/ fi


3

Preserve owner (-o, included in -a) is a feature only available to the superuser (root). Preserve group (-g, included in -a) is limited to the case where the user running rsync (on the destination site) is a member of the group. Rsync behaves this way because on most unix variants, these are the cases where it's allowed to set the target file's owner and ...


1

This is just a hunch, but are you running tests at the same time that you are deploying? The filenames look like temporary files that are being created and deleted while rsync is running.


1

depquid is very likely correct. I suggest you add this: --exclude='test.*.jar.?????' --exclude='.run-text.*.sh.?????' to the rsync command, maybe more; --exclude=app may also work as an alternative, depending on what you are doing. Btw, I think your implied -r and -p are redundant with -a.


1

Another way: $ noglob rsync server:/var/log/foo/2014-07-06-*.log . From zsh man page: noglob Filename generation (globbing) is not performed on any of the words.


2

You need to escape the special characters, e.g. $ rsync server:/var/log/foo/2014-07-06-\*.log . or $ rsync 'server:/var/log/foo/2014-07-06-*.log' . Or better, install url-quote-magic, e.g. autoload -Uz url-quote-magic zle -N self-insert url-quote-magic zstyle ':urlglobber' url-other-schema http https ftp mailto so that zsh will automatically do this ...



Top 50 recent answers are included