CodexBloom - Programming Q&A Platform

advanced patterns with `rsync` -- files not syncing correctly between two Linux servers

👀 Views: 68 💬 Answers: 1 📅 Created: 2025-07-07
rsync ubuntu linux bash

I'm trying to use `rsync` to sync files between two Linux servers (both running Ubuntu 22.04). However, I'm experiencing unexpected behavior where some files do not get transferred even though they exist on the source server. I run the command like this: ```bash rsync -avz /path/to/source/ user@destination:/path/to/destination/ ``` I’ve checked the following: - The source directory contains files that should be transferred, and their permissions allow reading. - The destination directory exists and is writable by the user. - I added the `--delete` option to ensure that files not in the source are removed from the destination, but I’m not sure if this is relevant. After running the command, I check the output and see messages like: ``` skipping non-regular file 'somefile.txt' ``` This seems to happen for text files, but not for others like images or binaries. I also used the verbose flag, and it shows no errors for those files, just the skip message. I need to ensure that all files, regardless of type, are synchronized. Is there a way to force `rsync` to include all files, or is there a specific flag I'm missing? Any help would be greatly appreciated!