netbirdio/netbird · error
failed to copy from to ;
Error message
failed to copy from %s to %s; %v
What it means
A per-entry copy operation (symlink, subdirectory, or file) failed inside cpDir's recursive walk. The message names the source and destination paths; the inner error says whether it was permissions, disk full, or a vanished file.
Solutions
- Check the inner error and the named paths for permission or space issues
- Ensure the destination is writable and not read-only mounted
- Retry the copy after fixing the underlying filesystem problem
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at client/cmd/root.go:410 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/284752bb265bf0dd.
Report an issue: GitHub.
Appendix: source
Thrown at client/cmd/root.go:410
return err
}
if fds, err = os.ReadDir(src); err != nil {
return err
}
for _, fd := range fds {
srcfp := path.Join(src, fd.Name())
dstfp := path.Join(dst, fd.Name())
fileInfo, err := os.Stat(srcfp)
if err != nil {
return fmt.Errorf("fouldn't get fileInfo; %v", err)
}
switch fileInfo.Mode() & os.ModeType {
case os.ModeSymlink:
if err = copySymLink(srcfp, dstfp); err != nil {
return fmt.Errorf("failed to copy from %s to %s; %v", srcfp, dstfp, err)
}
case os.ModeDir:
if err = cpDir(srcfp, dstfp); err != nil {
return fmt.Errorf("failed to copy from %s to %s; %v", srcfp, dstfp, err)
}
default:
if err = cpFile(srcfp, dstfp); err != nil {
return fmt.Errorf("failed to copy from %s to %s; %v", srcfp, dstfp, err)
}
}
}
return nil
}
func migrateToNetbird(oldPath, newPath string) bool {
_, errOld := os.Stat(oldPath)
_, errNew := os.Stat(newPath)
View on GitHub (pinned to 93e97f4bf1)