Tricky backup script, with a lot of work to be done yet