Laravel Forge Server Files Sync

Laravel Forge Server Files Sync using rsync is the way to go to quickly synchronize files between servers. Just do a simple

ssh -o ForwardAgent=yes forge@origin.com "rsync -aze 'ssh -o StrictHostKeyChecking=no' --progress /home/forge/origin.com/shared/public/ forge@destination.com:/home/forge/domain.com/shared/public/"

This is way faster than SFTP-ing it to your box and then to the server. Especially if your own box is thousands of miles away from the source and destination server. Like this you will be able to migrate your files from one server to another with ease.

We are talking media or client project files of course. For the other application data you of course should use Git and a deployer setup.

NB Also see similar setup for Roots Trellis Boxes

Tagged in : Tagged in : ,
Jasper Frumau

Jasper has been working with web frameworks and applications such as Laravel, Magento and his favorite CMS WordPress including Roots Trellis and Sage for more than a decade. He helps customers with web design and online marketing. Services provided are web design, ecommerce, SEO, content marketing. When Jasper is not coding, marketing a website, reading about the web or dreaming the internet of things he plays with his son, travels or run a few blocks.