I work between two servers, and I use one for development and the other for deployment. It’s very easy because I can tell the development one to use the database of the deployment sometimes. What I can't do is upload the images to a third service so both the sites will see the same images. Do you know any workflow in which this is possible? Are there any modules that allow you to upload images to an external service?
1 Answer
In my one of my setups I have a main server and a backup server. They are separate small virtual machines on different physical boxes. The entire Drupal install including file uploads is copied over from the main server to the backup server using rsync.
Rsync is an excellent command line *nix tool for copying, syncing files both locally and remotely. There are many configurations you can use. You can then configure a cron job to run it every so often. Here is one of the hundreds of threads
https://unix.stackexchange.com/questions/67539/how-to-rsync-only-new-files
In your case you could just rsync over the /sites/default/files folder. Just one solution to your problem, but there are many.
Other Drupal module soltions using 3rd party services (like you suggested) are Media mover, CDN and Storage API, all take a bit of configuring but worth it.
-
Thanks for the answer, sadly my host provider (open shift) won't let me install strange programs :(– gurghetCommented Nov 9, 2014 at 1:31
-
well if it's a linux server, it probably has rsync and cron already but if it's shared hosting you might not have access to the them. It might be worth asking. Efficient Drupal requires a cron setup anyway and if you have access to PHP's exec then you could create an admin interface to forward your files on. Commented Nov 9, 2014 at 9:56