# Using pt-archiver with –no-delete option

**URL:** <https://forums.percona.com/t/using-pt-archiver-with-no-delete-option/31336>\
**Category:** Percona Toolkit\
**Tags:** percona\
**Created:** [July 1, 2024, 2:40pm UTC](https://forums.percona.com/t/using-pt-archiver-with-no-delete-option/31336 "2024-07-01T14:40:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessio](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@alessio](https://forums.percona.com/u/alessio)\
**Post date:** [July 1, 2024, 2:40pm UTC](https://forums.percona.com/t/using-pt-archiver-with-no-delete-option/31336/1 "2024-07-01T14:40:12Z")

</div>

Hi there,

I was wondering if it is possible to use pt-archiver **with –no-delete** option but reaching out a mysql replica Slave as a Source DB instead of Master DB , just with the aim of not bothering the master DB.

I’m aware that there plenty of options for customizing even the UNLOAD, but I got curious about it and I’d like to get your opinion.

Cheers.

Alessio

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [July 1, 2024, 3:50pm UTC](https://forums.percona.com/t/using-pt-archiver-with-no-delete-option/31336/2 "2024-07-01T15:50:14Z")

</div>

Hello @alessio, I see no reason why you couldn’t run pt-archiver against a replica and set --no-delete. Have you tried this?

---

<div class="post-metadata">

**Author:** ![alessio](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@alessio](https://forums.percona.com/u/alessio)\
**Post date:** [July 1, 2024, 3:57pm UTC](https://forums.percona.com/t/using-pt-archiver-with-no-delete-option/31336/3 "2024-07-01T15:57:50Z")

</div>

Hi Matthew, thanks for getting back to me on this, nope but I’m gonna to give it a try soon. I’ll reach you out afterwards.

Cheers

Alessio

---

<div class="post-metadata">

**Author:** ![alessio](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@alessio](https://forums.percona.com/u/alessio)\
**Post date:** [September 6, 2024, 1:18pm UTC](https://forums.percona.com/t/using-pt-archiver-with-no-delete-option/31336/4 "2024-09-06T13:18:08Z")

</div>

Hi Matthew, apologise for being late in the reply but my work’s started to pile up lately.

I had a go in running a pt-archiver against a replica using the following option:

$PT\_ARCHIVER --source $PT\_SOURCE\_DSN   
–dest $PT\_TARGET\_DSN   
–where 1=1   
–no-delete   
–limit=100000   
–progress=100000   
–no-check-charset   
–no-safe-auto-increment \   
–why-quit \   
–statistics   
–sleep 5   
–commit-each

It worked fine and table rows got the new target DB smoothly.

Next step’ll be give a try to the only delete task using the --purge option on the master this time.

Thanks for getting back to on this.

Cheers.

Alessio
