A directory transfer can finish successfully while placing every file one level deeper than intended. With rsync, the spelling of the source path decides whether the source directory name is preserved at the destination.
A trailing slash on /srv/project/ means copy the contents of project. Without that slash, /srv/project means copy the directory entry named project together with everything below it.
Compare the two source forms in separate disposable destinations before using a backup, deployment, or restore path. An itemized dry run exposes the planned relative paths, and a file listing after two live copies confirms the resulting directory depth.
$ mkdir -p /tmp/rsync-slash-check
The sample source contains app/config.yml and reports/q2.csv under /srv/project. Replace /srv/project with the directory being evaluated, but keep both comparison destinations inside one disposable root.
$ rsync --archive --dry-run --itemize-changes /srv/project/ /tmp/rsync-slash-check/contents/ created directory /tmp/rsync-slash-check/contents cd+++++++++ ./ cd+++++++++ app/ >f+++++++++ app/config.yml cd+++++++++ reports/ >f+++++++++ reports/q2.csv
The planned paths begin with app/ and reports/ because the contents of project would land directly under /tmp/rsync-slash-check/contents/.
$ rsync --archive --dry-run --itemize-changes /srv/project /tmp/rsync-slash-check/parent/ created directory /tmp/rsync-slash-check/parent cd+++++++++ project/ cd+++++++++ project/app/ >f+++++++++ project/app/config.yml cd+++++++++ project/reports/ >f+++++++++ project/reports/q2.csv
Every planned path begins with project/ because rsync would retain the source directory as the first level under /tmp/rsync-slash-check/parent/.
$ rsync --archive /srv/project/ /tmp/rsync-slash-check/contents/
$ rsync --archive /srv/project /tmp/rsync-slash-check/parent/
$ find /tmp/rsync-slash-check/contents /tmp/rsync-slash-check/parent -type f -print /tmp/rsync-slash-check/contents/app/config.yml /tmp/rsync-slash-check/contents/reports/q2.csv /tmp/rsync-slash-check/parent/project/app/config.yml /tmp/rsync-slash-check/parent/project/reports/q2.csv
The first destination starts with app/ and reports/. The second adds exactly one directory level, project/, while preserving the same files beneath it.
$ rm -rf /tmp/rsync-slash-check
Confirm the exact path before running this command. Never substitute a backup, deployment, or restore destination for the temporary root.