Improved backup and restore API