3.5. lfc-push
: Push one or more large files to remote cache¶
This sends files from a WORKING repo to a remote cache. It copies files
from the local cache to a remote cache, so if large files are not cached
(using lfc add
), they cannot be pushed.
The first step is to find all .lfc
files matching the users input.
Users can specify which files to get by providing a list of file name
patterns. If the user does not specify any patterns, all files in the
current working directory or child directories (recursive) are pulled.
Then for each .lfc
file that meets these constraints, it reads that
file to find the hash. It then checks the working repo’s cache,
.lfc/cache/
for that file. If it’s present, it copies it to the
remote cache.
- Usage:
$ lfc push [PAT1 [PAT2 ...]] [OPTIONS]
- Inputs:
PAT1: First pattern for files to list
PAT2: Second pattern for files to list
- Options:
- -h, --help
Display this help message and exit
- -r, --remote REMOTE
Use remote cache named REMOTE (w/o
-r
flag, use default remote)- --mode MODE
Only push files of mode MODE: 1 | 2 | {both}
- -1
Shortcut for
--mode 1
- -2
Shortcut for
--mode 2
- -q, --quiet
Reduce STDOUT during download (no messages for up-to-date files)
- Examples:
This will push the files
myfile.dat
andotherfile.dat
if the filesmyfile.dat.lfc
andotherfile.dat.lfc
exist and are present in the local cache:$ lfc push myfile.dat otherfile.dat
Note that
$ lfc push myfile.dat.lfc otherfile.dat.lfc
is equivalent. Suppose the hash for this file is
'a4b3f7'
. Then it will look for the filea4/b3f7
in the local cache and then copy it to the remote cache with the same file name.This will push all files starting with
a
with mode=2 in the current folder or any child thereof$ lfc push "a*.lfc" -2