Improved backup and restore scripts.