Skip to content

Laravel Forge Server Files Sync

By Jasper Frumau

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

Comments are closed for this post.