public synchronized void copyStateTo(RrdUpdater other) throws IOException, RrdException {
		if(!(other instanceof RrdDb)) {
			throw new RrdException(
				"Cannot copy RrdDb object to " + other.getClass().getName());
		}
		RrdDb otherRrd = (RrdDb) other;
		header.copyStateTo(otherRrd.header);
		for(int i = 0; i < datasources.length; i++) {
			int j = Util.getMatchingDatasourceIndex(this, i, otherRrd);
			if(j >= 0) {
				datasources[i].copyStateTo(otherRrd.datasources[j]);
			}
		}
		for(int i = 0; i < archives.length; i++) {
			int j = Util.getMatchingArchiveIndex(this, i, otherRrd);
			if(j >= 0) {
				archives[i].copyStateTo(otherRrd.archives[j]);
			}
		}
	}