Tag Info

New answers tagged

5

ssh provides a connected stream from the local system running your rsync to another instance running on the remote server. The local rsync starts it as part of the ssh connection process - it is not the same instance of rsync that might be running as a daemon on that remote server. What is an ssh stream? An ssh stream is what you use when you ssh to a ...


0

I believe you wanted the same thing I did, and the above answers didn't hit it quite right. I want to use rsync to copy all these directories [from a list] preserving its absolute path to another location So, put the list in a file, one directory/file per line. Don't precede with a + or trail it with some funny combination of * Use rsync's ...


3

Assuming you believe the host really did change its host key you can delete the old entry. Since this one tells you the old entry is on line 2 you can do sed -i -e '2d' ~/.ssh/known_hosts to remove the old entry from you known hosts file


3

Answering my own question... In fact it is possible to remove directory from the remote server completely (including directory itself). Check the example below: rsync -r --delete --include 'x/***' --exclude '*' local_empty_directory/ rsync://some_server/some_share/x_parent_directory The key is to clean the parent directory for x (x_parent_directory in ...


0

I came up with this build.sh script: foldername=$(dirname $(pwd)) projname=$(basename $(pwd)) rsync -a --exclude-from=.rsyncrc $(pwd) $TMPDIR cd $TMPDIR zip -rq $foldername/$projname/dist/$projname-latest.zip $projname cd $foldername/$projname It resides in the root folder, so that whenever I want to package in zip the whole project, I run source build.sh ...


0

You started with rsync -artz root@remote-host:/dir/* /dir/ So in your scenario you can check if some_dir transfered correctly with rsync -artz root@remote-host:/dir/some_dir /dir/ (note the lack of a trailing / on the source path). If you get no errors then that directory tree has already completely transferred.


0

What exactly is the question here? You should add some detail on your invocation pattern of rsync to get any meaningful assistance. I've used rsync for years without problems. I think it's safe to say that any apparent corruption is due to improper usage of this versatile tool. If you don't pass -c, rsync skips based on modification time and size. Even if ...


1

Rsync copies files. That's what it does. Even if you tell it to remove source files, it still copies them first, it never moves them, even when the destination happens to be on the same filesystem. The mv utility from GNU coreutils has an option -u to move files only if the destination is older than the source or doesn't exist yet. This is similar to ...


2

rsync copies files, it never moves them. Combinations of find and mv will likely do what you want.


0

Following steps did the job for me: Run the rsync --dry-run first in order to get the list of files those would be affected. rsync -avzm --stats --safe-links --ignore-existing --dry-run --human-readable /data/projects REMOTE-HOST:/data/ > /tmp/transfer.log I fed the output of cat transfer.log to parallel in order to run 5 rsyncs in parallel, as ...


0

If the elements of your exclude list don't contain any whitespace or any wildcards, you can define a ROOT_EXCLUDE variable and use it unquoted. Unquoted variable expansions split the value of the variable at each whitespace sequence¹; then each element is expanded as a wildcard pattern if it contains any wildcard. ROOT_EXCLUDE="--exclude=/dev ...


1

You might consider 3 ways to reduce your proces impact on system load/CPU time: Use the nice command to manually lower the task's priority. Use the cpulimit command to repeatedly pause the process so that it doesn’t exceed a certain limit. Use Linux’s built-in control groups, a mechanism which tells the scheduler to limit the amount of resources available ...


2

rsync has a --min-size option: --min-size=SIZE don't transfer any file smaller than SIZE That should help you unless you have files that do have to be transferred if there is no zero byte sized file on the destination side of things. AFAIK there is no way to tell rsync to take special action based on source and destination side.


1

After your last backup using the old disk, create a timestamp and then backup files after that timestamp. You'll use find and the --newer flag to list files newer than the timestamp, then the --file-from flag to rsync to specify that list of files for copying. Here's how: Step 1: Before you swap to the new drive: touch /someplace/timestamp.txt Step 2: ...


1

presumably you have ssh access to the server? so either: grant the server ssh access to your local machine and then use something like ssh you@server 'find ... | xargs -0 -I {} rsync "{}" you@yourmachine:/media/dir' or: create a list of files on the server using find, then copy this file to your local machine and run rsync from there to grab these files ...


1

Unison is designed to be a bidirectional rsync. You can nonetheless use it in one direction if you wish. Unison prompts you to decide what to do for each file; press > to copy forward or / to skip a file. There's also a GUI if you prefer that. Alternatively, you can link the files into a staging area, then synchronize the stating area and clean it up. ...


0

A couple of variations on your option 2 seem plausible. I'll continue to assume you usually log in with $USER on $HOME, just like in your scenario. You've stated that you can't copy the files from $HOME to $CHOME because of permissions issues ($USER can't access $CUSER), and you can't bypass that with root because of your root_squash. 2a. Adjust the ...



Top 50 recent answers are included