···3434 - [Updating your PDS](#updating-your-pds)
3535 - [Environment Variables](#environment-variables)
3636 - [Migrating your PDS](#migrating-your-pds)
3737+ - [Fixing a Relay desync](#fixing-a-relay-desync)
3738 - [License](#license)
38393940<!-- tocstop -->
···356357This means that if you wipe and reinstall your PDS on the same hostname, or move it to a new hostname without performing the appropriate cutover steps, the PDS and Relay can go out of sync.
357358358359To avoid this, you should always [migrate accounts individually](https://atproto.com/guides/account-migration) from one PDS to another when updating your PDS host configuration.
360360+361361+### Fixing a Relay desync
362362+363363+If you become desynced from the Relay due to migration issues — i.e., new records created on your PDS aren't being picked up by other applications — you can fix it with these steps:
364364+365365+1. Look up the last known sequence number for your PDS host. You can use `goat` to retrieve the last observed cursor from the `bsky.network` relay:
366366+367367+```bash
368368+docker exec pds sh -c 'goat relay host status "$PDS_HOSTNAME" --json'
369369+```
370370+371371+```
372372+{"hostname":"justdothings.net","seq":12,"status":"active"}
373373+```
374374+375375+2. Stop the `pds` service:
376376+377377+```bash
378378+systemctl stop pds
379379+```
380380+381381+3. Set the cursor sequence on your PDS to the value of `seq` from step 1, incremented by 1:
382382+383383+```bash
384384+sqlite3 /pds/sequencer.sqlite "UPDATE sqlite_sequence SET seq = {new_sequence_number} WHERE name = 'repo_seq';"
385385+```
386386+387387+4. Restart your `pds` service:
388388+389389+```bash
390390+systemctl start pds
391391+```
392392+393393+New records should now be indexed as normal.
359394360395## License
361396