sync.md 738 字节
Newer Older
G
gongweibao 已提交
1
# Name  
G
gongweibao 已提交
2
sync - sync directories. Recursively copies new and updated files from the source directory to the destination
G
gongweibao 已提交
3 4

# Synopsis
G
gongweibao 已提交
5
` sync [OPTIONS]...
G
gongweibao 已提交
6 7 8 9 10
<LocalPath> <PFSPath> or <PFSPath> <LocalPath> or <PFSPath> <PFSPath>`

# Description

```
G
gongweibao 已提交
11 12
--preserve--links
   Reserve links when copy links
G
gongweibao 已提交
13 14 15
```

# Examples
G
gongweibao 已提交
16
- The following command sync locally directory to pfs
G
gongweibao 已提交
17 18

```
G
gongweibao 已提交
19
paddle pfs sync ./dir1 pfs://mydir1
G
gongweibao 已提交
20 21 22 23 24
```

Output

```
G
gongweibao 已提交
25 26 27
upload ./dir1/text1.txt to pfs://mydir1/text2.txt
upload ./dir1/text2.txt to pfs://mydir1/text2.txt
...
G
gongweibao 已提交
28 29
```

G
gongweibao 已提交
30
- The following command sync pfs directory to local
G
gongweibao 已提交
31 32

```
G
gongweibao 已提交
33
paddle pfs sync pfs://mydir1 .
G
gongweibao 已提交
34 35 36 37 38
```

Output

```
G
gongweibao 已提交
39 40 41
download pfs://mydir1/text1.txt to ./text1.txt
download pfs://mydir1/text2.txt to ./text2.txt
...
G
gongweibao 已提交
42
```