add backup functionality and command line options