Rsync problem after Stable Update 2023.08.29

Hi everyone, i’m facing an issue with rsync since after the update whenever I specify that a folder should be excluded rsync completely ignores it and copies everything anyway. I’m using the same command i’ve been using to do backups since the last two years but it doesn’t work as intended.

rsync -aAXv --info=progress2 --delete-excluded --exclude=TESTFOLDER/DONOTCOPY/ TESTFOLDER/ /run/media/username/TERRA\ DRIVE/TESTFOLDERTERRA

There is a folder called DONOTCOPY inside TESTFOLDER in my home/username folder i’ve tried several different ways of writing the excluded folder path but nothing works

This is a sample command for the format I usually use, please can someone tell me what’s wrong? I’m sure that the rsync command is bugged because none of the old commands I have saved work as before.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = (unset),
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
  Kernel: 6.1.49-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=efbf1a2d-e596-4547-a414-d02214967460 rw quiet
  Desktop: KDE Plasma v: 5.27.7 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
  Type: Laptop System: LENOVO product: 20RD007XAD v: ThinkPad E15
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20RD007XAD serial: <superuser required> UEFI: LENOVO
    v: R16ET30W (1.16 ) date: 01/17/2021
  ID-1: BAT0 charge: 42.6 Wh (99.3%) condition: 42.9/45.0 Wh (95.2%)
    volts: 11.9 min: 11.1 model: LGC 5B10W138 type: Li-poly serial: <filter>
    status: not charging cycles: 67
  Device-1: apple_mfi_fastcharge model: N/A serial: N/A charge: N/A
    status: N/A
  Device-2: hidpp_battery_0 model: Logitech Wireless Mouse M185/M225
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
  System RAM: total: 8 GiB available: 7.57 GiB used: 4.73 GiB (62.4%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
  Info: model: Intel Core i5-10210U bits: 64 type: MT MCP
    arch: Comet/Whiskey Lake note: check gen: core 10 level: v3 note: check
    built: 2018 process: Intel 14nm family: 6 model-id: 0x8E (142)
    stepping: 0xC (12) microcode: 0xF8
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 1770 high: 2100 min/max: 400/4200 scaling:
    driver: intel_pstate governor: powersave cores: 1: 2100 2: 2100 3: 805
    4: 2100 5: 2100 6: 2100 7: 2100 8: 761 bogomips: 33615
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
    clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu
    fsgsbase fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs
    ibrs_enhanced ida intel_pt invpcid invpcid_single lahf_lm lm mca mce
    md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat pbe
    pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pts rdrand
    rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1 sse4_2
    ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer
    vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
    filling, PBRSB-eIBRS: SW sequence
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
  Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Lenovo driver: i915
    v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports:
    active: eDP-1 empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:9b41 class-ID: 0300
  Device-2: AMD Lexa [Radeon 540X/550X/630 / RX 640 E9171 MCM] vendor: Lenovo
    driver: amdgpu v: kernel arch: GCN-4 code: Arctic Islands process: GF 14nm
    built: 2016-20 pcie: gen: 1 speed: 2.5 GT/s lanes: 4 link-max: gen: 3
    speed: 8 GT/s lanes: 8 bus-ID: 03:00.0 chip-ID: 1002:6987 class-ID: 0380
    temp: 52.0 C
  Device-3: IMC Networks Integrated Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-8:2 chip-ID: 13d3:5415
    class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.8 compositor: kwin_x11 driver: X:
    loaded: amdgpu,modesetting alternate: fbdev,vesa dri: iris,radeonsi gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x15f5 built: 2017 res: 1920x1080
    hz: 60 dpi: 142 gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5")
    ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 23.1.6-2 renderer: Mesa Intel UHD Graphics (CML
    GT2) direct-render: Yes
  Device-1: Intel Comet Lake PCH-LP cAVS vendor: Lenovo driver: snd_hda_intel
    v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
    chip-ID: 8086:02c8 class-ID: 0403
  API: ALSA v: k6.1.49-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.78 status: off with: pipewire-media-session
    status: active tools: pw-cli
  Server-3: PulseAudio v: 16.1 status: active with: 1: pulseaudio-alsa
    type: plugin 2: pulseaudio-jack type: module tools: pacat,pactl
  Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 2000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  IF-ID-1: enp0s20f0u3c4i2 state: down mac: <filter>
  WAN IP: <filter>
  Message: No bluetooth data found.
  Message: No logical block device data found.
  Message: No RAID data found.
  Local Storage: total: 1.36 TiB used: 512.71 GiB (36.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
    model: WDS500G3X0C-00SJG0 size: 465.76 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 111110WD temp: 24.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD10SPZX-08Z10
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 5400 serial: <filter> fw-rev: 1A05 scheme: GPT
  Message: No optical or floppy data found.
  ID-1: / raw-size: 465.46 GiB size: 457.09 GiB (98.20%)
    used: 88.24 GiB (19.3%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
    label: N/A uuid: efbf1a2d-e596-4547-a414-d02214967460
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 300 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
    label: NO_LABEL uuid: 8FFA-CCFC
  ID-3: /run/media/username/TERRA DRIVE raw-size: 931.51 GiB
    size: 915.82 GiB (98.31%) used: 424.47 GiB (46.3%) fs: ext4 dev: /dev/sda1
    maj-min: 8:1 label: TERRA DRIVE uuid: 0937e0eb-95a3-4c29-b7eb-1aad2ad9cd97
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: file size: 512 MiB used: 470 MiB (91.8%) priority: -2
    file: /swapfile
  Message: No unmounted partitions found.
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
      type: still imaging driver: ipheth,usbfs interfaces: 3 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 500mA
    chip-ID: 05ac:12a8 class-ID: 0601 serial: <filter>
  Device-2: 1-5:5 info: Logitech Unifying Receiver type: mouse,HID
    driver: logitech-djreceiver,usbhid interfaces: 2 rev: 2.0
    speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1 power: 98mA
    chip-ID: 046d:c52f class-ID: 0300
  Device-3: 1-8:2 info: IMC Networks Integrated Camera type: video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s (57.2 MiB/s) lanes: 1
    mode: 2.0 power: 500mA chip-ID: 13d3:5415 class-ID: 0e02
  Device-4: 1-9:3 info: Shenzhen Goodix FingerPrint Device
    type: <vendor specific> driver: N/A interfaces: 1 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 100mA
    chip-ID: 27c6:55a4 class-ID: ef00
  Hub-2: 2-0:1 info: super-speed hub ports: 6 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  System Temperatures: cpu: 59.0 C pch: 56.0 C mobo: N/A gpu: amdgpu
    temp: 52.0 C
  Fan Speeds (rpm): fan-1: 2900 fan-2: 2900
  Processes: 273 Uptime: 1h 12m wakeups: 14 Init: systemd v: 253
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 15.0.7
  Packages: 1532 pm: pacman pkgs: 1516 libs: 410 tools: pamac pm: flatpak
  pkgs: 16 Shell: Bash v: 5.1.16 running-in: yakuake inxi: 3.3.29

Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

The slash ‘/’ after the ‘source’ folder changes the behavior, see the trasnfer summaries in the screenshot. If you remove that red marked postfix ‘/’, it works as expected (at least on my system).
In the above screenshot you see 1. the command without the slash, then 2. with slash (as copied from your post; which on my system indeed also copies the DONOTCOPY folder), then 3. again without slash (giving the same result as 1.)…

Hope this helps.

remember to use use quotes in your exclude

  • best practise to avoid accidents when names contain one or more spaces
  • you don’t need to escape spaces

and a trailing slash means something

  • so don’t use a trailing slash - unless intentional

this will exclude the folder


this will include the folder but exclude the content


Thanks for the quick reply and the screenshot. I appreciate it.

The problem isn’t with the source folder path, the problem is with the excluded folder.

I am unable to exclude the DONOTCOPY folder from being copied to the destination directory

My folders are as follows: inside TESTFOLDER there are only two items, a folder called DONOTCOPY and a textfile called bla.txt

rsync -aAXv --info=progress2 --delete-excluded --exclude=TESTFOLDER/DONOTCOPY TESTFOLDER/ /run/media/username/TERRA\ DRIVE/TESTFOLDERTERRA/

When I run the above command I am telling rsync to exclude TESTFOLDER/DONOTCOPY from being copied to the destination folder, however it copies both the DONOTCOPY folder as well as the bla.txt, it should only copy the bla.txt file and nothing else.

Can you please try it again? rsync is completely ignoring the exclude instruction. I tried excluding the file instead of the folder and still nothing happens

I have several rsync commands that i’ve saved for backups and I’ve done them daily for the last 2 years almost. Only after the update did this issue happen. I use similar commands on my laptop and desktop and both have the same issue with the exclude command not working after updating.

Thanks for the reply, it doesn’t seem to make any difference whether in quotes or not. I’ve tried both. My initial commands were without the quotes.

Although you are right about the trailing “/” I removed it

with the exclude the trailing slash appears to have no meaning for the test I did

13:59:43 ○ [fh@tiger] ~
 $ cd temp

13:59:47 ○ [fh@tiger] ~/temp
 $ tree .
├── foo
│   ├── excludeme
│   │   └── excludeme.txt
│   └── includeme.txt
├── footemp
└── footemp2

5 directories, 2 files

13:59:48 ○ [fh@tiger] ~/temp
 $ rsync -a  /home/fh/temp/foo/ /home/fh/temp/footemp2/

13:59:56 ○ [fh@tiger] ~/temp
 $ rsync -a --exclude="excludeme" /home/fh/temp/foo/ /home/fh/temp/footemp/

14:00:04 ○ [fh@tiger] ~/temp
 $ tree .
├── foo
│   ├── excludeme
│   │   └── excludeme.txt
│   └── includeme.txt
├── footemp
│   └── includeme.txt
└── footemp2
    ├── excludeme
    │   └── excludeme.txt
    └── includeme.txt

6 directories, 5 files

14:00:08 ○ [fh@tiger] ~/temp
 $ rsync --version
rsync  version 3.2.7  protocol version 31

I’m a bit confused now. The main point of my reply was about the trailing ‘/’ being the culprit, just like linux-aarhus pointed out in the reply that followed mine. I also highlighted it with red in my screenshot; so I don’t see the point of trying your command again, since I already did… as shown in the screenshot. The problem actually is the format of the source folder, namely the postfixed ‘/’.

Anyways, do I understand correctly that you figured it out and got things working again? :+1: ?

The trailing slash only takes effect with the paths - not with the --exclude= where it - and I verified - it has no effect unless you specify something after the slash - in which case the --exclude doesn’t exclude.

17:09:20 ○ [fh@tiger] ~/temp
 $ mkdir footemp3
mkdir: created directory 'footemp3'

17:09:42 ○ [fh@tiger] ~/temp
 $ tree .
├── foo
│   ├── excludeme
│   │   └── excludeme.txt
│   └── includeme.txt
├── footemp
│   └── includeme.txt
├── footemp2
│   ├── excludeme
│   │   └── excludeme.txt
│   └── includeme.txt
└── footemp3

7 directories, 5 files

17:09:45 ○ [fh@tiger] ~/temp
 $ rsync -a --exclude="excludeme/" /home/fh/temp/foo/ /home/fh/temp/footemp3/

17:11:21 ○ [fh@tiger] ~/temp
 $ tree .
├── foo
│   ├── excludeme
│   │   └── excludeme.txt
│   └── includeme.txt
├── footemp
│   └── includeme.txt
├── footemp2
│   ├── excludeme
│   │   └── excludeme.txt
│   └── includeme.txt
└── footemp3
    └── includeme.txt

7 directories, 6 files

17:11:26 ○ [fh@tiger] ~/temp
 $ mkdir footemp4
mkdir: created directory 'footemp4'

17:11:43 ○ [fh@tiger] ~/temp
 $ rsync -a --exclude="excludeme/." /home/fh/temp/foo/ /home/fh/temp/footemp4/

17:12:16 ○ [fh@tiger] ~/temp
 $ tree .
├── foo
│   ├── excludeme
│   │   └── excludeme.txt
│   └── includeme.txt
├── footemp
│   └── includeme.txt
├── footemp2
│   ├── excludeme
│   │   └── excludeme.txt
│   └── includeme.txt
├── footemp3
│   └── includeme.txt
└── footemp4
    ├── excludeme
    │   └── excludeme.txt
    └── includeme.txt

9 directories, 8 files

omg… I finally found out what the problem for me was :man_facepalming:

I was running the rsync command from the home directory, if I run the command from the /home/username/TESTFOLDER directory instead with a small change to the --exclude command it works perfectly for me.

First I go to /home/username/TESTFOLDER directory

and then:

rsync -aAXv --info=progress2 --delete-excluded --exclude=DONOTCOPY /home/username/TESTFOLDER/ /run/media/username/TERRA\ DRIVE/TESTFOLDERTERRA/

It gave the exact result I wanted, copying the contents of TESTFOLDER to TESTFOLDERTERRA but excluding DONOTCOPY. I was using rsync from the wrong working directory.

Now it works as intended for me I can exclude the folder or its contents in the way you guys described above.

Thank you so much to both AddiejeWoah and linux-aarhus for your help. I appreciate the time and effort you guys spent to help me. :slightly_smiling_face: :+1:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.