Incorrectly copying Jenkins instances can break job symlinks.
This can cause
permalink errors in the logs and prevent job history from loading correctly,
even causing job builds to fail.
Copying Jenkins directories to new location on same instance
cp -Rp SOURCE TARGET
-R switch is for recursive and the
-p switch ensures that links are preserved.
Copying Jenkins directories to new location on different instance
rsync -avz -e ssh /src/dir firstname.lastname@example.org:dst/dir
NOTE Do not use
scp to copy Jenkins to another instance as scp does not preserve symlinks.