Skip to content

Vlad-Shcherbina/urd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

upload-run-download

This is a simple program that uploads current directory to a remote machine using rsync, runs a specified command there, and downloads the results back to the local machine.

Usage

urd <remote machine> <command to run there>

Details

If you run it from a my_project directory, it will be copied to remote_machine:~/my_project.

Stuff in .gitignore will be skipped. (This relies on the property that rsync filter syntax is almost the same as gitignore syntax.)

If an optional file .urd_download is present, files and directories specified there will be downloaded back to the local machine afterwards (one rsync call per entry). For example:

# comments and blank lines are skipped
output.txt
logs/experiment.log
dist/ -> outputs/$machine/dist/

An entry is either a path, or remote path -> local path. $machine expands to the machine name. Trailing slashes have their usual rsync meaning: dist/ copies the contents of the directory, dist copies the directory itself. Missing local parent directories are created automatically.

Entries that don't exist on the remote machine produce a warning but are not fatal, so it's fine to list optional outputs that are not always present.

About

poor man's borg

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages