Tag Info

Hot answers tagged

17

Rsync doesn't try to resolve conflicts. This isn't its job. Rsync doesn't even have a way to detect that both sides have modified the file, because it has no information about any common ancestor. With the default options, the source file is unconditionally copied to the destination, overwriting the destination file. With the option -u, the source file is ...


5

If your source and destination are on separate systems, with an rsync client talking to an rsync server (of any sort), then the permissions and timestamps will be updated without a data content transfer. For example: rsync -avP --existing server:/path/to/source /path/to/target rsync -avP --existing server::module /path/to/target On the other hand, if your ...


4

You can use scp -r to copy files recursively between different hosts. Your syntax could be like scp -r user@Ubuntu-Server:/home/myuser ./from_Ubuntu_server Besides, you might be able to upload your local rsync binary using scp to the Ubuntu server and add the --rsync-path=/home/myuser/rsync to your original rsync command to let your client rsync know which ...


3

When using the rsync daemon, the first part of the path is not considered a folder, but more of a repository. The rsync daemon looks up the full path to the files of this repository in its conf file and repository name is trimmed from the path on the destination. To get the behaviour you expect skip the daemon and just use ssh. If you need to get around ...


2

I often use SSH port tunneling to create an encrypted channel. Since you're using an rsync:// URL I assume you have the rsync daemon running on TCP port 873 on the remote server. We can forward this port as follows: ssh -N -L 873:localhost:873 rsyncssh@server The -N option prevents the execution of a remote command, which would in your case disconnect the ...


2

You can use a tar and ssh combintaion like this: sudo tar cvzf - folder/ | ssh -C user_name@host_name "cd ~/; tar xvzf -"


2

rsync -av --files-from=/location/file.txt / user@server:/location/ That will copy the local file /location1/file2.abc to /location//location1/file2.abc etc. As rsync will invoke ssh only once, you only have to enter the password once. You may want to investigate using ssh keys though.


1

You're doing everything fine. Just missing a colon here. Try this: rsync -av -e ssh $DATASTORE:/usr/local/somepath $DESTDIR/usr/local/someotherpath/


1

Try to replace $DATASTORE by ${DATASTORE}:


1

rsync -avz /dev/sda1 user@ip:/backup/ would attempt to copy the device node, not the disk content. You can make an image of the partition as a remote file: ssh -C user@ip:/backup/sda1.img </dev/sda1 This makes an image of the partition. It won't give you access to your files. In order to access your files, you need to mount the partition or the image: ...


1

You can do dd if=/dev/sda of=back.sda bs=10M You can increase or reduce the bs(block size) based on your i/o capacity(fast increase,slow decrease),then copy the back.sda with scp or rsync on backup. Later you can mount the image and recovery the files,this will work if sda is not broken disk,if is corrupted you can try a fsck. Rsync works for files,i ...


1

If you have the permission to use FUSE on your local machine, install the sshfs package. SSHFS lets you access remote files via normal filesystem access: it mounts a directory tree accessed over SFTP. You only need to have SFTP access on the remote side (which is enabled by default with OpenSSH on Ubuntu). Once the remote directory is mounted, you can use ...


1

-i, --itemize-changes output a change-summary for all updates Also: -v, --verbose increase verbosity


1

Here is the timeline of events. The first backup made by rsnapshot will be hourly.0. When the second backup is made by rsnapshot, it first renames hourly.0 to hourly.1 and the proceeds to create a new hourly.0. When the third backup is made by rnapshot, it first renames hourly.1 to hourly.2, renames hourly.0 to hourly.1, and then creates hourly.0. Thus ...


1

To restart, --partial is sufficient. Use --inplace if you really don't want rsync to create a temporary file that merges the existing copied data and the new, for example if rsync will have permissions issues creating a temporary file in the target folder. Only use --append if you can guarantee that the partially copied data is still identical to the ...


1

I wanted to preserve my symlinks as symlinks. For that you can use the -l option. -l, --links copy symlinks as symlinks Since I was copying frameworks on OS X, I found this helpful.



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