Upload Directorys to block storage using linode-cli
Hey!
Are you able to upload directorys to linode block storage using linode-cli, or it is a limitation?
If it is a limitation, is there an alternative?
1 Reply
The Linode-CLI commands for Block Storage seem to be limited to simple interactions with the service itself (i.e. creating/deleting volumes, attaching, mounting/unmounting, and resizing). As far as I am aware, although the both the CLI and Block Storage API allow for mount path specifications, neither option allow you to create directories or manipulate data.
In order to do that, you would need to mount your Volume, SSH (Secure Shell) or LISH (Linode Shell) Console into the corresponding Linode, and perform the filesystem/data work from within the Linode itself.
In order to transfer files to your Linode/Block Storage Volume, you would want to use either the scp
command or make use of a service like FileZilla or WinSCP:
- How to Transfer Files With the scp Command on Linux | Linode Docs
- Transfer Files with FileZilla | Linode Docs
- Transfer Files with WinSCP on Windows | Linode Docs
Since the Volume is mounted to your Linode's filesystem, your data copying/moving commands would be directed at the respective Volume pathing. For example, if Block Storage Volume test_volume-01 is mounted at /dev/test_volume-01, you could copy a directory/folder from your local system using the command syntax:
scp -r $PATH/OF/SOURCE/DIRECTORY $USER@$IP_ADDRESS:/dev/test_volume-01/$DESTINATION/DIRECTORY