def tar_archive(name, path, remote=True): ''' Compress the source path into a tar archive. ''' cmd = 'tar -czvf {} {}'.format(name, path) with hide('stdout'): runner.run(cmd, remote=remote)