It sounds like you overwrote all of the contents, instead of "merging" them. If you have a data and internal_data directory, then you shouldn't have lost any data; if they're missing, then you'll need the files from your last backup (for avatars and attachments). Otherwise, you can create library/config.php based on the content that's in library/config.php.default.
1 click upgrading in the future would be a nice feature to prevent retard mistakes like I just made. There goes a whole morning of work, good thing my host made me a backup this morning.