Questions tagged [rsync]

a utility used to synchronise files between locations (possibly over a network)

rsync is a commandline tool for efficiently copying and backing up data from one location (the source) to another (the destination). It can be used for local backup of files, a backup over a network, synchronising a remote website and many other uses.

While rsync can be used directly from the commandline or from within a script there is also a gui for rsync called grsync for Ubuntu users who are not willing to use the commandline.

References:

See also:

757 questions
354
votes
6 answers

How do I make rsync delete files that have been deleted from the source folder?

I recently set up a machine with Ubuntu Server to host game servers. I installed a backup plugin for each game server that creates frequent backups of game world files in a particular folder on the machine. I also established a cron task to…
user254251
  • 3,613
  • 2
  • 12
  • 4
248
votes
3 answers

How to exclude multiple directories with rsync?

I am trying to backup my home directory using rsync, and I want to exclude some of the directories that contain junk. I want to specifically exclude /home/ben/.ccache and /home/ben/build. Unfortunately the documentation for rsync was information…
Freedom_Ben
  • 8,942
  • 7
  • 26
  • 36
106
votes
9 answers

rsync over ssh "error in protocol data stream" (code 12). ssh works

I tried: rsync -v -v -e 'ssh -p YY' ./testfile me@XXXXX:/home Error Message opening connection using: ssh -p YY -l me 146.6.84.206 rsync ->-server -vvve.s . /home [sender] make_file(testfile,*,0) send_file_list done send_files…
user3391229
  • 1,175
  • 2
  • 7
  • 7
105
votes
6 answers

Using rsync with sudo on the destination machine

Having a problem that rsync does not set UID and GID as expected, my gut feeling is that rsync should be run as root on the destination machine. I can't login as root via SSH, since that's disabled for security purposes. The user on the destination…
Thomas Weller
  • 4,377
  • 4
  • 23
  • 35
88
votes
7 answers

How can I view a progress bar when running rsync?

I am using Ubuntu 12.04 as a repo and would like to view a progress bar when using rsync from the command line. I tried the option suggested in this article (-P), but I prefer to see a progress bar and not use Grsync. I am using rsync -P source…
Joseph Smith
  • 1,003
  • 1
  • 7
  • 6
77
votes
9 answers

How to rsync to android

How can I connect to my android device to rsync music (or other stuff)?
guettli
  • 2,932
  • 12
  • 67
  • 115
65
votes
2 answers

How to exclude a folder from rsync

I am trying to backup my home folder on my NAS drive. I am giving this: rsync -Paz --exclude-from 'rsync-exclude.txt' /home/chris/ admin@192.168.1.65:LinuxHome where rsync-exclude.txt has this…
xpanta
  • 1,481
  • 3
  • 13
  • 23
63
votes
5 answers

rsync exclude hidden files doesnt work!

I’ve searched all over the internet and everybody suggests the same thing - that adding --exclude=´.*´ should exclude hidden files and folders from an rsync. It doesn’t. I´ve also tried adding a slash and/or double quotes eg. --exclude=¨\.*¨…
user289455
  • 887
  • 2
  • 9
  • 13
45
votes
2 answers

Preserve directory tree while copying with rsync

When I do something like: rsync Videos/YouTube/LetsPlays foo@bar:/home/foo/ The resulting directory structure looks like: /home/foo/LetsPlays I've read the man pages but couldn't an option to maintain the directory structure, aiming for…
Markus
  • 1,545
  • 7
  • 21
  • 26
43
votes
3 answers

Is there any GUI application for command rsync?

I am currently synchronize between local folders in my computer by following command: rsync -av --delete "[source]" "[destination]" Now I want to do this via GUI. so, Is there any GUI available for Ubuntu which works similar as by command rsync?…
APLUS
  • 911
  • 2
  • 7
  • 15
43
votes
5 answers

Ubuntu 22.04 SSH the RSA key isn't working since upgrading from 20.04

Up until last week I was running Ubuntu 20.04 happily, and then over the weekend decided to back everything up and install 22.04. I've had a couple of teething issues which I've solver, however I'm having real issues with SSH. I have two first…
Colin
  • 948
  • 1
  • 7
  • 9
38
votes
4 answers

Backup your home directory with rsync and skip useless folders

You can easyly backup your home folder on an external harddrive with rsync -a --exclude=.cache --progress /home/$USER /media/linuxbackup/home/$USER I excluded the .cache folder cause I think I will never need it when I have to re-install from this…
rubo77
  • 31,573
  • 49
  • 159
  • 281
33
votes
4 answers

Increase verbosity of running rsync process?

I'm running 'rsync -a -i /foo /bar'. Every now and then I would like to know what exactly rsync is doing at the moment without having the -v output all the time. Is it possible to increase the verbosity of running processes e.g. by sending a kill…
Germar
  • 6,217
  • 2
  • 24
  • 39
32
votes
2 answers

Rsync with special character files not working between Mac and Linux

I want to use rsync to backup my Ubuntu server with a disk residing on a Mac. But I do not get it to work properly, since every time I re-run the rsync operation after the initial time, the files with special characters are first deleted and then…
Nick The Swede
  • 987
  • 1
  • 10
  • 22
29
votes
6 answers

Monitor/Watch running rsync process

I have an rsync job that has been added to a crontab and when it's running, I can only check that there's a rsync PID and confirm with htop that it's eating up n amount of CPU and RAM. What I'd like to do is to monitor what files are actually being…
vanz
  • 767
  • 3
  • 7
  • 12
1
2 3
50 51