Not a developer? Go to MovableType.com

Documentation

SyncTarget

This is documentation about a configuration directive, which can be placed within Movable Type’s core configuration file, mt-config.cgi, to customize the behavior of the system.

This option is used by Publish Queue to specify a machine you would like to publish files to. If you wish to publish, or rsync files to multiple servers you can include multiple SyncTarget directives within mt-config.cgi. For example, to sync published files from the system on which Movable Type is installed to the same filesystem path on web01.somedomain.com and web02.somedomain.com, then you would add the following to your mt-config.cgi file:

SyncTarget  web01.somedomain.com
SyncTarget  web02.somedomain.com

Note: This functionality is currently limited to syncing files via the same filesystem path, on the other servers and you cannot use HOST:/PATH syntax provided through the rsync command line tool because MT uses the --relative and --files-from options which change rsync’s default behaviors. Please see the rsync man page for more details if you are unfamiliar with these options.’

See Also

Back

3 Comments

spag

spag on July 10, 2009, 4:24 a.m. Reply

How to change sync user on the publisher side?

apache account is locked for synchronization on secure servers so there is now way to set up keys for that user. Any Ideas?

Jay Allen

Jay Allen on July 10, 2009, 2:46 p.m. Reply

I am assuming that this follows the rsync command syntax in which case there is almost always a username and @ sign at the front unless the user on the remote system is the same as the user on the local system.

So, an example like this would be informative if this is the case:

SyncTarget  web01.somedomain.com:/var/www/html
SyncTarget  otheruser@web02.somedomain.com:/var/www/html
spag

spag on July 13, 2009, 5:23 a.m. Reply

SyncTarget works when running manually ./run-periodic-tasks from using dedicated user for rsync with keys(linux). But there is a problem with paths. Path for rsync are incorrect ( i get: /var/www/html/var/www/html ). To fix a problem:

SyncTarget otheruser@web02.somedomain.com:/ -but it could show error messages about privileges in top directories.

Is it possible to SyncTarget when using www backend ? (user apache has no shell to execute rsync command)

Leave a Comment