On Mon, 10 Mar 2025 23:56:47 +0100
"
[email protected]" <
[email protected]> wrote:
#root@Server001:~# cp -ax / /mnt
#cp: das Verzeichnis '/mnt/' kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
# LANG=C.UTF-8 cp -ax / /mnt
provides English error messages.
Are you sure you mounted something to the /mnt target?
To achieve your goal you might try:
mkdir /srv/rootfs
mount --bind / /srv/rootfs
mount ${yourdevice} /mnt
rsync -au /srv/rootfs/ /mnt/
umount /mnt
umount /srv/rootfs
rmdir /srv/rootfs
The trailing slash at the end of rootfs in
the rsync line is mandatory for your use case.
You can repeat this to copy newer data and it will run faster, since
the rsync -u option will prevent copying files which weren't changed.
The -a option archives permissions, ownership etc. as maybe expected
from the cp command.
--
regards
Frank
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE86z15c6qwvuAkhy+zDIN/uu9BloFAmfQBQIACgkQzDIN/uu9 BloEAgv/SHn96aanXTO53jNzZqPIyDsUK7u0A0mWBvMheCoIYqk973pjfhmG5jPx Ha13rYHdGhvPttGeObV8Rv4/EXv4icnMtOp9BQj4i+2hQaS61fF7Qy7060UM6Y7c efj+vjKiP9ypXeUNLMCmfhvCAnRMiKocpp1dHC2CoVt3u73Gf3b8xU3NUSxFCRZJ FRNpN4B7u/FOaqVO3niT4IJneQ3BfJA16WGiFIVFEB5KRC45NWemhhKeXeFV2c9t wdOJFue17pq2Rp3AQ5YHbEA7vIgIyPm0cn0J3qcL/PisTP34xGlk0XKTxmXmEsT7 xRsaPXU7jNoCc0u+ggm39t/JGFg6Wpp3Gw1VoxKjvDz90yjIebQX1728OhBHOyCg a4Szr5fsuptkeZwVpt1CjLMmbTzyt4IgZfs1c+euQtU+Gx2hEIibA9tXjbvML+LO 1zpuSk8Q+WDK5/XUGimK+orwScn8aB3oonPD53JjLF1Z+ZMWgD/xLFsrRzFo62uF
8evbizoY
=1kV2
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)