cling on by (one's) fingernails

cling on by (one's) fingernails

To narrowly avoid problems or failure. They're clinging on by their fingernails out there—the other team's offensive is totally overwhelming them. Now that I have three small children to care for, I feel as if I'm clinging on by my fingernails every day.
See also: cling, fingernail, on