1
1
# FAQ
2
2
3
- ## How to grab from multiple sources?
3
+ ## Timezone
4
4
5
- You can add multiple sources in the ` sources ` field of the configuration file:
5
+ By default, all interpretation and scheduling is done with your local timezone ( ` TZ ` environment variable).
6
6
7
- ``` yaml
8
- ftp|sftp :
9
- ...
10
- sources :
11
- - /path1
12
- - /path2/folder
7
+ Cron schedule may also override the timezone to be interpreted in by providing an additional space-separated field
8
+ at the beginning of the cron spec, of the form ` CRON_TZ=<timezone> ` :
9
+
10
+ ``` shell
11
+ $ ftpgrab --schedule " CRON_TZ=Asia/Tokyo */30 * * * *"
13
12
```
14
13
15
14
## What kind of CRON expression can I use for scheduling?
@@ -21,59 +20,25 @@ A CRON expression represents a set of times, using 6 space-separated fields.
21
20
22
21
More examples can be found on the [ official library documentation] ( https://godoc.org/github.com/robfig/cron#hdr-CRON_Expression_Format ) .
23
22
23
+ ## How to grab from multiple sources?
24
+
25
+ You can add multiple sources in the ` sources ` field of the configuration file:
26
+
27
+ ``` yaml
28
+ ftp|sftp :
29
+ ...
30
+ sources :
31
+ - /path1
32
+ - /path2/folder
33
+ ` ` `
34
+
24
35
## What Regexp semantic is used to filter inclusions/exclusions?
25
36
26
37
FTPGrab uses [Compile](https://golang.org/pkg/regexp/#Compile) to parse regular expressions. This means the regexp
27
38
returns a match that begins as early as possible in the input (leftmost) like Perl, Python, and other implementations
28
39
use. You can test your regular expression on [regex101.com](https://regex101.com/) and select Golang
29
40
flavor. Check this [quick example](https://regex101.com/r/jITi0D/1).
30
41
31
- # # What logs look like?
32
-
33
- Here is a sample output :
34
-
35
- ` ` ` text
36
- Tue, 29 Jan 2019 22:23:58 CET INF Starting FTPGrab 5.0.0
37
- Tue, 29 Jan 2019 22:23:58 CET INF ########
38
- Tue, 29 Jan 2019 22:23:58 CET INF Connecting to 198.51.100.0:21...
39
- Tue, 29 Jan 2019 22:23:58 CET INF Grabbing from /complete/
40
- Tue, 29 Jan 2019 22:23:59 CET INF --------
41
- Tue, 29 Jan 2019 22:23:59 CET INF Checking /complete/Burn.Notice.S06E16.VOSTFR.HDTV.XviD.avi
42
- Tue, 29 Jan 2019 22:23:59 CET INF Never downloaded
43
- Tue, 29 Jan 2019 22:23:59 CET INF Downloading file (184.18MB) to /tmp/seedbox/Burn.Notice.S06E16.VOSTFR.HDTV.XviD.avi...
44
- Tue, 29 Jan 2019 22:24:47 CET INF File successfully downloaded!
45
- Tue, 29 Jan 2019 22:24:47 CET INF Time spent: 48 seconds
46
- Tue, 29 Jan 2019 22:24:47 CET INF --------
47
- Tue, 29 Jan 2019 22:24:47 CET INF Checking /complete/Burn.Notice.S06E17.VOSTFR.HDTV.XviD.avi
48
- Tue, 29 Jan 2019 22:24:47 CET INF Never downloaded
49
- Tue, 29 Jan 2019 22:24:47 CET INF Downloading file (186.27MB) to /tmp/seedbox/Burn.Notice.S06E17.VOSTFR.HDTV.XviD.avi...
50
- Tue, 29 Jan 2019 22:25:40 CET INF File successfully downloaded!
51
- Tue, 29 Jan 2019 22:25:40 CET INF Time spent: 50 seconds
52
- Tue, 29 Jan 2019 22:25:40 CET INF --------
53
- Tue, 29 Jan 2019 22:25:40 CET INF Checking /complete/test_special_chars/123.bin
54
- Tue, 29 Jan 2019 22:25:40 CET INF Never downloaded
55
- Tue, 29 Jan 2019 22:25:40 CET INF Downloading file (33.27kB) to /tmp/seedbox/test/test_special_chars/123.bin...
56
- Tue, 29 Jan 2019 22:25:42 CET ERR Error downloading, retry 1/3 error="dial tcp 198.51.100.0:21: connect: connection refused"
57
- Tue, 29 Jan 2019 22:25:42 CET INF --------
58
- Tue, 29 Jan 2019 22:25:42 CET INF Checking /complete/test_special_chars/123.bin
59
- Tue, 29 Jan 2019 22:25:42 CET INF Exists but size is different
60
- Tue, 29 Jan 2019 22:25:42 CET INF Downloading file (33.27kB) to /tmp/seedbox/test/test_special_chars/123.bin...
61
- Tue, 29 Jan 2019 22:25:44 CET ERR Error downloading, retry 2/3 error="dial tcp 198.51.100.0:21: connect: connection refused"
62
- Tue, 29 Jan 2019 22:25:44 CET INF --------
63
- Tue, 29 Jan 2019 22:25:44 CET INF Checking /complete/test_special_chars/123.bin
64
- Tue, 29 Jan 2019 22:25:44 CET INF Exists but size is different
65
- Tue, 29 Jan 2019 22:25:44 CET INF Downloading file (33.27kB) to /tmp/seedbox/test/test_special_chars/123.bin...
66
- Tue, 29 Jan 2019 22:25:46 CET ERR Error downloading, retry 3/3 error="dial tcp 198.51.100.0:21: connect: connection refused"
67
- Tue, 29 Jan 2019 22:25:46 CET ERR Cannot download file error="dial tcp 198.51.100.0:21: connect: connection refused"
68
- Tue, 29 Jan 2019 22:25:46 CET INF Time spent: 6 seconds
69
- Tue, 29 Jan 2019 22:25:46 CET INF --------
70
- Tue, 29 Jan 2019 22:25:46 CET INF Checking /complete/exlcuded_file.txt
71
- Tue, 29 Jan 2019 22:25:46 CET INF Not included
72
- Tue, 29 Jan 2019 22:25:46 CET WRN Skipped: Not included
73
- Tue, 29 Jan 2019 22:25:46 CET INF ########
74
- Tue, 29 Jan 2019 22:25:51 CET INF Finished, total time spent: 1 minute 56 seconds
75
- ` ` `
76
-
77
42
## How can I edit/remove some entries in the database?
78
43
79
44
FTPGrab currently uses the embedded key/value database [bbolt](https://github.com/etcd-io/bbolt).
0 commit comments