# Copying a file from your local machine to your service
scp -s /path/to/local/file YOUR_SERVICE@ssh.YOUR_REGION.render.com:/destination/path/for/remote/file
file        100% 5930KB 999.9KB/s   00:05
```

> We recommend using SCP with the `-s` flag to use the more modern SFTP protocol. Future releases of SCP will default to using SFTP, and this flag will no longer be needed.

### Magic-Wormhole

The [Magic-Wormhole library](https://magic-wormhole.readthedocs.io/en/latest/) enables you to transfer files to and from your disk-backed service without using SSH and SCP.

1. In the [Render Dashboard][dboard], go to your service's **Shell** page.

2. **If you have a Docker-image-backed service,** use the shell to install `magic-wormhole`:

   - Run `apt update && apt install magic-wormhole` or the equivalent for your environment.
   - The `magic-wormhole` library is pre-installed on all Render native runtimes.

3. Use the shell to transfer your file with the `wormhole` command:

   ```shell{outputLines:2-3}
   wormhole send /path/to/filename.txt
   Sending 10.5 MB file named 'filename.txt'
   Wormhole code is: 4-forever-regain
   ```

4. Note the code that appears in the output from `wormhole`. Then, from any internet-connected machine, install [magic-wormhole](https://magic-wormhole.readthedocs.io/en/latest/welcome.html) and run `wormhole receive`, entering in the code when prompted.

## Disk limitations and considerations

When attaching a persistent disk to your service, note the following:

- *Only filesystem changes under your disk's mount path are preserved across deploys and restarts.*

  - The rest of your service's filesystem remains [ephemeral](deploys#ephemeral-filesystem).

- A persistent disk is accessible by only a single service instance, and only at runtime. This means:

  - You can't access a service's disk from any other service.

  - You can't [scale](scaling) a service to multiple instances if it has a disk attached.

  - You can't access persistent disks during a service's [build command](deploys#build-command) or [pre-deploy command](deploys#pre-deploy-command) (these commands run on separate compute).

  - You can't access a service's disk from a [one-off job](one-off-jobs) you run for the service (one-off jobs run on separate compute).

- Adding a disk to a service prevents [zero-downtime deploys](deploys#zero-downtime-deploys). This is because:

  - When you redeploy your service, Render stops the existing instance _before_ bringing up the new instance.

  - This instance swap takes a few seconds, during which _your service is unavailable_.

  - This is a necessary safeguard to prevent data corruption that can occur when different versions of an app read and write to the same disk simultaneously.

- You can't add a disk to a [cron job](cronjobs) service.

  - As an alternative, you _can_ add a disk to a [background worker](background-workers), which is useful for processes that run continuously and don’t expose a port.

- You can increase your disk's size later, but you can't _decrease_ it. Pick the smallest value that currently works for your service.

  - Increasing a disk's size does not cause downtime. The additional storage becomes available to your service within a few seconds.