Ixian
Patron
- Joined
- May 11, 2015
- Messages
- 218
Kubectl's syntax for cp is different and I'm trying to figure out the correct way to copy local files and directories in to PVC storage.
For example, say I have configuration data for Radarr in /mnt/ssd-storage/appdata/radarr and I want to copy all the files and directories inside it to the /config directory my Radarr pod, where I have configured a pv. If I do:
(where ix-radarr/radarr-5c7cb4d676-xhj4g is my persistent volume)
It copies everything to a new config/ sub-directory inside the /config directory, not the files and directories to /config itself.
Kubectl cp has different syntax than regular Unix-style cp (for example, recursive is implied) and it could be I'm missing something on how absolute/relative paths are handled but it eludes me. Obviously I can just open a shell to the app and use cp inside it to put the files in the correct structure but isn't there a better way to do this?
For example, say I have configuration data for Radarr in /mnt/ssd-storage/appdata/radarr and I want to copy all the files and directories inside it to the /config directory my Radarr pod, where I have configured a pv. If I do:
Code:
k3s kubectl cp /mnt/ssd-storage/appdata/radarr ix-radarr/radarr-5c7cb4d676-xhj4g:/config
(where ix-radarr/radarr-5c7cb4d676-xhj4g is my persistent volume)
It copies everything to a new config/ sub-directory inside the /config directory, not the files and directories to /config itself.
Kubectl cp has different syntax than regular Unix-style cp (for example, recursive is implied) and it could be I'm missing something on how absolute/relative paths are handled but it eludes me. Obviously I can just open a shell to the app and use cp inside it to put the files in the correct structure but isn't there a better way to do this?