Shared Cluster Hosting Command Line Sync Tools

Advomatic has created several command line tools to assist you in moving your data efficiently between your staging server and the Shared Cluster webservers.

Note: These commands can only be used for servers within the Advomatic network.

Site_Synch

The site_synch utility is a command line tool used to move files from your staging server to all of the webservers in the Shared Cluster.

This is a very powerful tool, and it is possible to overwrite your entire site. Please use it with caution. If you have any questions, email support@advomatic.com prior to using this utility.

Usage

$ site_synch folder_or_file_to_be_synced

The file or folder is relative to the webroot -- usually this is ~/www, but the actual webroot may vary based upon custom configuration.

Example

$ site_synch sites/all/modules/

This will push your ~/www/sites/all/modules directory and everything underneath it, to the Shared Cluster production servers. Note the trailing slash '/'

$ site_synch sites/all/thisismytestfile.txt

This will push your ~/www/sites/all/thisismytestfile.txt file to the Shared Cluster production servers.

Notes

- The destination is always relative to the web root (most likely ~/www). This means that even if you are in a deeper directory and you do a '$ site_synch .'
you will synch THE ENTIRE SITE.
- To protect user uploaded data already on the Shared Cluster production servers, the /files directory in the webroot is excluded by this tool.
- Please use caution when synching a directory that is frequently changing (i.e. a theme directory). You may inadvertently push something to the Shared Cluster production servers that is not production ready.

DB_Synch

The db_synch utility is a command line tool used to copy a database from either your staging server to the production servers or from the production servers to your staging server.

No matter which direction you are copying the database, it is important to understand that this a destructive command: in copying a database from one server to another, it will overwrite the data on the destination server.

Please use this command with care.

NOTE: THE DESTINATION AND SOURCE ARE REVERSED FROM WHAT YOU WOULD EXPECT!

Usage

$ db_synch destination source

The 'destination' will be overwritten with the 'source'.

Examples

This will copy your staging database to the Shared Cluster production database:

$ db_synch YOURSITE.com YOURSITE.advomatic.com

This will copy the Shared Cluster production database to your staging server:

$ db_synch YOURSITE.advomatic.com YOURSITE.com

Notes

- THE DESTINATION AND SOURCE ARE REVERSED FROM WHAT YOU WOULD EXPECT
- This utility will leave a backup copy of each database in your home directory, just in case you need to undo your actions. Keep in mind that "undo" is a manual mysql restore. Email support@advomatic.com for further instructions.
- This utility will not work if $db_url is an array (i.e. a site accesses multiple databases via db_set_active()). In this case you will need to do a manual mysqldump and restore. Email support@advomatic.com for further instructions.

Contact Us