Tag Info

Hot 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 ...


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

Based on the comments to my original question, make rsync output to stdout with the -i flag and use a non string check condition to see if anything actually changed within the error code check. Wrapping the rsync command in a variable allows the check to be done. RSYNC_COMMAND=$(rsync -aEim --delete /path/to/remote/ /path/to/local/) if [ $? -eq 0 ]; ...


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 ...


2

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


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

How do I fully mirror the linux partition while it's running? Not the best idea (for many reasons, rsync(1) running out of memory being the main one), but it might be possible. Can I exclude any of the root directories safely? Some of them (f.i. /proc) must be excluded, most of the others probably should be backed up. Will it be easy to ...


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 ...


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

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 ...



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