# diffChangeLog with two offline databases

**URL:** <https://forum.liquibase.org/t/diffchangelog-with-two-offline-databases/8647>\
**Category:** General Discussion\
**Created:** [September 14, 2023, 2:04pm UTC](https://forum.liquibase.org/t/diffchangelog-with-two-offline-databases/8647 "2023-09-14T14:04:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lroal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/lroal/32/1068_2.png) [@lroal](https://forum.liquibase.org/u/lroal)\
**Post date:** [September 14, 2023, 2:04pm UTC](https://forum.liquibase.org/t/diffchangelog-with-two-offline-databases/8647/1 "2023-09-14T14:04:47Z")

</div>

I have two manually created changelog files. The first, from.xml that represents the previous state of the database, and to.xml that represents the current state.  
Now, from these two I want to create a migration (changelog), but all i get is a file with no changes.

–changeLogFile=“out.xml”  
–url=“offline:xml?changeLogFile=from.xml”  
–username=“postgres”  
–password=“\*\*\*\*\*”"  
–headless=“true”  
–referenceUrl=“offline:xml?changeLogFile=to.xml”  
diffChangeLog

---

<div class="post-metadata">

**Author:** ![wwillard](https://avatars.discourse-cdn.com/v4/letter/w/8e8cbc/32.png) [@wwillard](https://forum.liquibase.org/u/wwillard)\
**Post date:** [November 8, 2023, 12:05am UTC](https://forum.liquibase.org/t/diffchangelog-with-two-offline-databases/8647/2 "2023-11-08T00:05:26Z")

</div>

The `diffChangeLog` compares live databases or offline database snapshot files, and produces a changelog. It does not work with the actual changelog files. Database snapshots are created by running the `snapshot` command.

At this point you can’t really go back and capture a snapshot of the previous state, since you have already updated to the current state. But, in order to do what you what you want to do, you need to take a snapshot, run `update` to deploy your new changes, and then run diffChangelog` to produce a changelog with the new changes.

The format for specifying offline database snapshot files is documented here:

`https://docs.liquibase.com/workflows/liquibase-community/offline.html`

Feel free to ask more questions if this is not clear.
