Tag Info

New answers tagged

1

As others have pointed out, you need to separate the host specification from the path specification with a colon (:) - rsync -av -e ssh "$DATASTORE":/usr/local/somepath "$DESTDIR"/usr/local/someotherpath/ I will also point out that this will put somepath into your target directory "$DESTDIR"/usr/local/someotherpath, so that you end up with ...


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

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.


0

This is because you are using the -a option when you do the copy with rsync and you do not use the -a option with cp. This results in the timestamps on the cp copied files not being preserved. PS giving rsync additional -v options results in additional output. Although I am using rsync version 3.1.0 protocol version 31, which has a slightly different ...


0

rsync -avz LIB_COMMON/ LIB_CZ/ LIB_RESULT/ --delete-after This will sync the content of lib_common/ & lib_cz/ to the lib_result/ folder.


0

rdiff-backup seems to do what you want, check it out. Using rsync you must first make a full backup not using hard links. The next backup can point to the previous backup and hard link to it. That way your backups are not hard linked to your working files (the ones you are modifying). Example. If my previous backup was so folder backup.01 my backup ...


0

This answer to a different question helped: http://stackoverflow.com/a/22558474/652971 Here's how I would do this: rsync $( find ./one/ -type f $(printf "! -name %s " `ls ./two/`) find ./two/ -type f ) user@remote:/path/


-1

Have you tried to run this rsync -avrzW ~/clone/ root@mysite.com:/var/www/ manually ? Normally if i do a rsync over ssh I use the -e option. rsync -avrzW ~/clone/ -e ssh root@mysite.com:/var/www/ This will ask u for a password or use a password less key. I would strongly adviced not to use a root account for this kind of things..It better to add a user ...


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

rsync can use directly ssh,using -e rsync -avP -e /home/share/ remote:/home/share otherwise a tunnel works fine,another solution can be stunell


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


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 you have to pass the source folder before you state the -av -e switch: $ rsync /cygdrive/c/users/Owner/Pictures/ -av -e ssh blah@192.168.1.10:/var/files/ImageSync/


2

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


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


1

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


0

I have been gathering info about the journaling systems in ext3 and ext4, and a chapter in wikipedia on ext4 Delayed allocation and potential data loss, made me think of rsync as a potential cause for fragmentation. Googling that fraze sent me here, and I actually see described the result of the process I was going to ask about! The suggestion to tar to ...


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


0

--append presumes the file may already exist in the destination, it just makes rsync not check the content already there (but see below). --partial tells rsync to not delete partially transferred files. You'll also need --inplace with --partial (it is implied with --append). Turns out --inplace actually implies --partial, this is why --append is enough ...


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.


0

Rsync doesn't keep any memory from one run to the next. If you move a file to a different computer, rsync doesn't care. If you interrupt rsync in the middle of transferring a large file (it isn't clear from your question whether you intended to do that), that file is lost. To keep partial transfers, pass the --partial option.


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


0

Because of the lack of reactions, I posted my question on another forum. And there I got the answer! This is what my /etc/rc.conf.local now looks like: ntpd_flags= inetd_flags= inetd=YES


0

Look at rsnapshot. I'm pretty sure it will do everything you want, and as a bonus can be expanded to keep files for longer than two months when you get a bigger drive.


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


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



Top 50 recent answers are included