# Populate stack-based volume remotely?

**URL:** <https://forums.suse.com/t/populate-stack-based-volume-remotely/7301>\
**Category:** Rancher 1.x\
**Created:** [September 9, 2017, 11:05pm UTC](https://forums.suse.com/t/populate-stack-based-volume-remotely/7301 "2017-09-09T23:05:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathuin](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/mathuin/32/1391_2.png) [@mathuin](https://forums.suse.com/u/mathuin)\
**Post date:** [September 9, 2017, 11:05pm UTC](https://forums.suse.com/t/populate-stack-based-volume-remotely/7301/1 "2017-09-09T23:05:04Z")

</div>

With API keys I can run `rancher volume create blah` from my local workstation and it will create a volume in my environment. How can I copy files into that volume from my local workstation? Right now the only thing I can see to do is to use `scp` or `rsync` to move them to my Rancher host, then `docker run --rm -it -v $(pwd):/source -v stack-blah-8675309:/dest busybox cp -R /source /dest` or the like. Is there a better way?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [September 10, 2017, 7:37am UTC](https://forums.suse.com/t/populate-stack-based-volume-remotely/7301/2 "2017-09-10T07:37:10Z")

</div>

It’s a little circuitous but if you mount it into a container and know the host and container name/id you can do

`rancher --host <host id> docker cp some/file <conatiner id>:/path/to/volume/`

---

<div class="post-metadata">

**Author:** ![mathuin](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/mathuin/32/1391_2.png) [@mathuin](https://forums.suse.com/u/mathuin)\
**Post date:** [September 10, 2017, 7:51pm UTC](https://forums.suse.com/t/populate-stack-based-volume-remotely/7301/3 "2017-09-10T19:51:36Z")

</div>

I got the host ID through`rancher hosts`, I got the container ID through `rancher ps -c`, and I know the path to the volume because I have the `docker-compose.yml` file. So that’s actually all doable.

A `rancher cp` that used Rancher’s container names instead of Docker’s container IDs would be nice but probably not necessary. It’s a shame that Docker itself doesn’t really support remove volume access and we have to do it this way, but at least this works!
