Using Volume as Storage for PDF files

Hello
A newbie here, experimenting with Linux commands, and would like to ask for some help.
I have mounted a Volume with my Linode and it is showing up when I run the df -h.
The thing is there is a folder inside my website used for the storage of PDF files, and I would like to transfer this folder to the new Volume.
How do I achieve this, so that whenever someone uploads something to this directory, it gets uploaded to this new volume?

Thank You

1 Reply

There are two ways that I think you can go about this. First I'd recommend you take a backup of your Linode in the event things do not go as planned.

  1. Change the path in your websites configuration to point to your mounted volume. After making this change, upload a test file and see where it goes.

  2. You can also create a symbolic link which works like a shortcut to link the folder on your Linode to one on the volume. With a symbolic link, you're only refereeing the old folder to the new folder on the volume. This means whatever file is uploaded into the folder on your Linode will also be available on the volume. So it's kinda a mirror copy of that folder on your volume. Hopefully this helps.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct