Make sure you are on 0.9.3c client so you have access to the wallet_export_keys command. If the wallet file is a recent backup you may not need to sync the whole chain as your wallet would contain all the keys.
wallet_export_keys <json_filename> Exports encrypted keys to a JSON file
Exports encrypted keys to a JSON file
Parameters:
json_filename (filename, required): the full path and filename of JSON file to generate