[Cialug] Auto create link in a folder

Scott Yates Scott at yatesframe.com
Sun May 17 19:16:43 CDT 2015


Yep, that seems like a better fit for sure!

On Sun, May 17, 2015 at 6:24 PM, Pixie <pix at kepibu.org> wrote:

> This sounds like a perfect fit for a union mount for the staging
> directory (see unionfs, aufs, overlayfs).
>
> Something like:
>   unionfs-fuse
>
> /var/www/staging/wp-content/uploads-real=RW:/var/www/live/wp-content/uploads=RO
> /var/www/staging/wp-content/uploads
>
> (overlayfs may make more sense, depending on your kernel version.)
>
>
>
> On 2015.05.17 16:23, Matthew Nuzum wrote:
> > I have a live wordpress site and a staging wordpress site. I have a
> > job that can periodically copy the live site over to staging to keep
> > the test site relatively up to date. However, this site deals with
> > large files and it is wasteful to keep a duplicate copy of them on
> > the same drive.
> >
> > What I’d like to do is create a link for the files in the live site
> > over to staging whenever it is created. I don’t care if the links are
> > soft or hard. For example,
> >
> > If a file is created in /var/www/live/wp-content/uploads
> > automatically create a link to it in
> > /var/www/staging/wp-content/uploads.
> >
> > I can create a batch job that does this every so often, but is there
> > an easy way to have it happen automatically? I seem to remember a
> > service that will watch file for file modifications and do something
> > on demand. That seems like an efficient way to do it. I was thinking
> > the service was called iwatch or similar, but searching for that only
> > shows me stuff about the Apple Watch.
> >
> > Here’s what I don’t want to do: I don’t want to symlink the uploads
> > folder. I want to be able to upload files to staging without them
> > going to live.
> >
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>


More information about the Cialug mailing list