Web lists-archives.com

Re: Backup problem using "cp"




Hi,

Richard Owlett wrote:
> cp -ax / "/media/richard/MISC
> backups/dev_sda14/"
> cp: cannot stat '/media/richard/MISC
> ...
> File name too long

You tell cp to copy / including its sub tree /media/richard/... which is
the target of the copy process. So as soon as reading reaches that tree
it begins to copy itself into itself endlessly until it bonks against
a filesystem limit.

You need to exclude the target directory from being copied.
E.g. by not giving "/" as copy source but rather all its files and
directories except "/media".


Have a nice day :)

Thomas