update backup and restore action in order to fix some reentrance bugs