Construct backup and restore pipelines in ruby.