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:

804 questions
399
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
  • 4,063
265
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
  • 9,662
146
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,593
133
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 W.
  • 5,119
114
votes
10 answers

rsync over ssh "error in rsync 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 starting…
user3391229
  • 1,255
82
votes
13 answers

How to rsync to android

How can I connect to my android device to rsync music (or other stuff)?
guettli
  • 1,905
69
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 content: /home/chris/Downloads/* /home/chris/Downloads/…
xpanta
  • 1,551
65
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=¨\.*¨ Nothing…
60
votes
6 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
  • 1,148
58
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,695
49
votes
4 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
  • 961
41
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
  • 34,490
38
votes
5 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,567
  • 2
  • 28
  • 40
34
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…
33
votes
2 answers

rsync delete files from target if not existing in source

Okay so I have looked up the existing answers here and elsewhere but what I can't find out is, if I use the --ignore-existing option along with the --delete option, will this combination I still be able to have rsync delete files from the target if…
user2028856
  • 1,271
1
2 3
…
53 54