@@ -46,15 +46,45 @@ we'll use `./my-data` here.
46
46
If you have just one account, you can do as follows
47
47
48
48
``` sh
49
- docker run -v ./my-data:/data -ti ghcr.io/joeyates/imap-backup:latest \
50
- imap-backup single backup \
49
+ docker run \
50
+ --volume ./my-data:/data \
51
51
--dns 8.8.8.8 \
52
- --email me@example.com --password mysecret --server imap.example.com \
53
- --path /data/me_example.com
52
+ ghcr.io/joeyates/imap-backup:latest \
53
+ imap-backup single backup \
54
+ --email me@example.com \
55
+ --password mysecret \
56
+ --server imap.example.com \
57
+ --path /data/me_example.com
54
58
```
55
59
56
60
Podman will work exactly the same.
57
61
62
+ Notes:
63
+
64
+ * If you're using Docker, add ` --user $(id -u):$(id -g) ` so that the files
65
+ created by the container are owned by you and not by root,
66
+ * Pass imap-backup the ` --password-environment-variable=VARIABLE_NAME ` or
67
+ ` --password-file=FILE ` option to avoid having your password in
68
+ the command line history:
69
+
70
+ ``` sh
71
+ docker run --env THE_PASSWORD=$THE_PASSWORD \
72
+ ... \
73
+ imap-backup single backup \
74
+ --password-environment-variable=THE_PASSWORD \
75
+ ...
76
+ ```
77
+
78
+ or
79
+
80
+ ``` sh
81
+ docker run \
82
+ ... \
83
+ imap-backup single backup \
84
+ --password-file=/data/password.txt \
85
+ ...
86
+ ```
87
+
58
88
If you have multiple accounts, you can create a configuration file.
59
89
60
90
You'll need to choose a path on your computer where your configuration will be saved,
@@ -63,16 +93,27 @@ we'll use `./my-config` here.
63
93
First, run the menu-driven setup program to configure your accounts
64
94
65
95
``` sh
66
- docker run -v ./my-config:/config -v ./my-data:/data -ti ghcr.io/joeyates/imap-backup:latest \
96
+ docker run \
97
+ --volume ./my-config:/config \
98
+ --volume ./my-data:/data \
67
99
--dns 8.8.8.8 \
68
- imap-backup setup -c /config/imap-backup.json
100
+ --tty \
101
+ --interactive \
102
+ ghcr.io/joeyates/imap-backup:latest \
103
+ imap-backup setup \
104
+ --config /config/imap-backup.json
69
105
```
70
106
71
107
Then, run the backup
72
108
73
109
``` sh
74
- docker run -v ./my-config:/config -v ./my-data:/data --dns 8.8.8.8 -ti ghcr.io/joeyates/imap-backup:latest \
75
- imap-backup backup -c /config/imap-backup.json
110
+ docker run \
111
+ --volume ./my-config:/config \
112
+ --volume ./my-data:/data \
113
+ --dns 8.8.8.8 \
114
+ ghcr.io/joeyates/imap-backup:latest \
115
+ imap-backup backup \
116
+ --config /config/imap-backup.json
76
117
```
77
118
</details >
78
119
0 commit comments