Adrift In the Pacific, or Two Years Vacation is an adventure novel by Jules Verne, published in 1888. Know also has The Strange Adventures of a Schoolboy Crew; Long Vacation; Second Year Ashore.
Accidentally or purposely, the moorings got cast off without anyone on board being the wiser and the schooner drifted out to sea with only the boys on board. Twenty two days later they are cast on the shore of an unknown island. And so begins another Verne robinsonade with boys always fighting among themselves. They are finally rescued two years later by some good people pursued by pirates who are subdued with the aid of the boys.