Tag Info

Hot answers tagged

20

As you say, use rsync: rsync -azP /var/www/html/txt/ username@ip-address:/var/www/html/txt The options are: -a : enables archive mode, which preserves symbolic links and works recursively -z : compress the data transfer to minimise network usage -P : to display a progress bar and enables you to resume partial transfers As @aim says in his answer, make ...


6

Just use rsync over ssh! rsync -av username@ip:/var/www/html/txt /var/www/html/ From the man page: -a, --archive : This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything (with -H being a notable omission). The only exception to the above equivalence is when --files-from is ...


5

This, like most things, is explained in rsync's extremely comprehensive man page (emphasis mine): When the file transfer finishes, rsync replaces the progress line with a summary line that looks like this: 1,238,099 100% 146.38kB/s 0:00:08 (xfr#5, to-chk=169/396) In this example, the file was 1,238,099 bytes long in total, the average ...


3

The problem most likely lies in your use of the -a flag on rsync. That is equivalent to a set of other options, including -t, which preserves the modification time of the files. As you don't restart the application on the target machine, you are now dependent on that machine rereading some or all of those files or not, depending on the application and ...


2

The speed doesn't decrease. It slowly approaches the real speed that was there from the start. Such copies normally involve buffers at the OS level and these need to be pushed out for real, what the application doesn't notice. Before they fill up, they are measuring how fast things get copied in the output buffer, and once that is filled your network speed ...


2

The most efficient way to do this is to resume transfer from where it left off. #!/bin/bash source_disk=/dev/sda host=1.2.3.4 host_image=/foo/bar.img bytes_transferred() { if ! ssh "$host" "test -e '$host_image'"; then echo 0 return fi ssh "$host" "stat '%s' '$host_image'" } bytes_total() { echo $(( $(blockdev --getsz $source_disk) * 512 ...


2

First of all, regarding the "resume" part of your question, --partial just tells the receiving end to keep partially transferred files if the sending end disappears. Such files will exist as hidden files in their target folders (e.g. .TheFileYouAreSending.lRWzDC), or a specifically chosen folder if you also set the --partial-dir switch. --partial doesn't ...


1

Yes the -v option should only list the transferred files/directories. Are there any applications running that might change the Pictures folder? Maybe you can try this: mkdir /backup/Pictures rsync -avHc Pictures/ /backup/Pictures Did it make any difference? Maybe try after the first run diff /backup Pictures, what's the output there?


1

This tells rsync to look in each directory for a file .gitignore: rsync --filter='dir-merge,-n /.gitignore' [...] That should do what you want. The -n after the dir-merge means that (-) the file specifies only excludes and (n) rules are not inherited by subdirectories.


1

You should use rrsync (probably available gzipped on your system e.g. in /usr/share/doc/rsync/scripts/) and associate a line in your authorized_keys file with the public key installed there for the rsync: command="$HOME/bin/rrsync -ro ~/rsyncdir/",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding If necessary more detail can be ...


1

That screen command is fine, but didn't work for my needs exactly. This worked a lot better: nohup rsync -va --delete ###.###.###.###:/var/www/sites/ /var/www/sites < /dev/null &



Only top voted, non community-wiki answers of a minimum length are eligible