             (cb) =>
                 if not need_to_save
                     cb(); return
-                dbg("get the data center where this project is currently running")
-                @get_data_center
-                    server_id : server_id
-                    cb : (err, _dc) =>
-                        dc = _dc
-                        cb(err)
-            (cb) =>
-                if not need_to_save
-                    cb(); return
-                dbg("get the targets for replication")
-                @get_hosts
-                    cb : (err, t) =>
-                        v = (x for x in t when x != server_id)
-                        dbg("sync_targets = #{misc.to_json(v)}")
-                        f = (target_id, cb) =>
-                            @get_external_ssh
-                                server_id : target_id
-                                dc        : dc
-                                cb        : (err, addr) =>
-                                    if err
-                                        cb(err)
-                                    else
-                                        targets.push(addr)
-                                        cb()
-                        async.map v, f, (err) =>
-                            dbg("sync_targets --> #{misc.to_json(targets)}")
-                            cb(err)
-            (cb) =>
-                if not need_to_save
-                    cb(); return
                 dbg("save the project and sync")
                 project.save
-                    targets : targets
+                    targets : misc.keys(targets)
                     cb      : (err, result) =>
                         r = result?.result
                         dbg("RESULT = #{misc.to_json(result)}")

                dbg("do the sync")
                tm = cassandra.now()
                project.sync
                    targets     : targets
                    union       : opts.union
                    destructive : opts.destructive
                    snapshots   : opts.snapshots

    constructor: (@project_id, @global_client) ->
        @database = @global_client.database

    get_location_pref: (cb) =>   # db(err, server_id)
        @database.select_one
            table   : "projects"
            columns : ["bup_location"]
