Using pt-archiver with –no-delete option

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

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

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

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