Web lists-archives.com

Re: Backup problem using "cp"




Richard Owlett wrote:
> I'm attempting to backup current partition  to a USB connected 1 TB drive.
>
> I get:
>
>> root@debian-jan13:/home/richard# cp -ax / "/media/richard/MISC
>> backups/dev_sda14/"
>> cp: cannot stat '/media/richard/MISC
>> backups/dev_sda14/home/richard/.local/share/Trash/expunged/73080846/grub2
>> problem-2018-02-13/grub2 problem-2018-02-13/grub2
>> problem-2018-02-13/grub2 problem-2018-02-13/grub2
>> problem-2....018-02-13/grub2 problem-2018-02-13': File name too long
>
> After multiple re-readings of man page for cp I suspect:
>
> -t, --target-directory=DIRECTORY
>      copy all SOURCE arguments into DIRECTORY
>
> -T, --no-target-directory
>      treat DEST as a normal file
>
> but am actually quite lost.
> HELP please.
> TIA

the filename (including path) is too long for 'cp' to handle.  Might
also hold true for other tools (e.g. rsync).  perhaps just completely
empty the trash? 
-- 
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281