early 13c., scrapen, "make erasures (with a knife), erase" (a sense now obsolete); by late 14c. as "to remove (an outer layer) with a sharp or rough instrument," probably in part from Old Norse skrapa "to scrape, erase" and in part from cognate Old English scrapian "to scrape," both from Proto-Germanic *skrapojan (source also of Dutch schrapen, German schrappen), from PIE *skerb- (an extension of the root *sker- (1) "to cut").
The meaning "gather by great effort, collect with difficulty or by small savings" is from 1540s. From 1640s as "draw back the foot as a gesture of obeisance." By 1741 in the transitive sense of "rub harshly on (a surface) in passing along it so as to cause an abrasion or noise." Related: Scraped; scraping.
To scrape acquaintance "get on terms of acquaintance with by careful effort" is from c. 1600. To scrape the bottom of the barrel in the figurative sense of "make do with the most inferior or defective examples of what is wanted for want of any others" is by 1942, in reference to U.S. employers facing worker shortages during the war (the figurative bottom of the (cracker) barrel is by 1938).
mid-15c., "a scraping instrument;" late 15c., "act of scraping or scratching," from scrape (v.). By 1886 as "a scraping sound."
From 1620s as a type of awkward bow or gesture of obeisance, in which the foot is drawn, or "scraped," backward. The meaning "embarrassing or awkward predicament," usually due to imprudence or thoughtlessness, is by 1709, as OED suggests, probably "from the notion of being 'scraped' in going through a narrow passage." In old slang it could mean "a shave" (1859).
Old English be- (unstressed) or bi (stressed) "near, in, by, during, about," from Proto-Germanic *bi "around, about," in compounds often merely intensive (source also of Old Saxon and Old Frisian bi "by, near," Middle Dutch bie, Dutch bij, German bei "by, at, near," Gothic bi "about"), from PIE *bhi, reduced form of root *ambhi- "around."
As an adverb by c. 1300, "near, close at hand."
OED (2nd ed. print) has 38 distinct definitions of it as a preposition. Originally an adverbial particle of place, which sense survives in place names (Whitby, Grimsby, etc., also compare rudesby). Elliptical use for "secondary course" was in Old English (opposed to main, as in byway, also compare by-blow "illegitimate child," 1590s, Middle English loteby "a concubine," from obsolete lote "to lurk, lie hidden"). This also is the sense of the second by in the phrase by the by (1610s).
By the way literally means "along the way" (c. 1200), hence "in passing by," used figuratively to introduce a tangential observation ("incidentally") by 1540s. To swear by something or someone is in Old English, perhaps originally "in the presence of." Phrase by and by (early 14c.) originally meant "one by one," with by apparently denoting succession; modern sense of "before long" is from 1520s.
By and large "in all its length and breadth" (1660s) originally was nautical, "sailing to the wind and off it," hence "in one direction then another;" from nautical expression large wind, one that crosses the ship's line in a favorable direction.
also standby, 1796, "that which stands by one," originally nautical, of a vessel kept nearby for emergencies, from verbal phrase stand by "await, support, remain beside" (mid-13c.); see stand (v.) + by. Meaning "state of being ready for duty" is from 1946. In civil aviation, as an adjective meaning "without a booked ticket," from 1961. As an order to hold one's self in readiness, it is recorded from 1660s.