adding connection error durability for export
adding connection error durability for import
moving common backup script code into its own file