Improve the Friendica backup script to handle database errors