# Errors in command-line arguments:

**URL:** https://forums.percona.com/t/errors-in-command-line-arguments/32828
**Category:** MySQL & MariaDB
**Created:** [September 1, 2024, 1:32pm UTC](https://forums.percona.com/t/errors-in-command-line-arguments/32828 "2024-09-01T13:32:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SumitKumar](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@SumitKumar](https://forums.percona.com/u/SumitKumar)
#### Post date: [September 1, 2024, 1:32pm UTC](https://forums.percona.com/t/errors-in-command-line-arguments/32828/1 "2024-09-01T13:32:24Z")

</div>

Hi,

Below error during archive the table data , Please look into this and provide a solution

[root@DELGEMIDACRMDB1UAT dump]# pt-archiver --source h=localhost,u= **,p='**',D=bid\_draft\_testing31082024,t=bid\_item\_consignee --where ‘bic\_bid\_id in (select b\_id from bids join bid\_attributes on b\_id = ba\_bid\_id where ba\_created\_on \<= ‘2024-02-08 00:00:00’ and b\_status=0)’ --no-check-charset --limit=5000 --commit-each --file /dump/%Y-%m-%d-%D.%t 2\>\> /dump/arch.err  
Usage: pt-archiver [OPTIONS] --source DSN --where WHERE

Errors in command-line arguments:

- Unrecognized command-line options 00:00:00 and b\_status=0)

pt-archiver nibbles records from a MySQL table. The --source and --dest  
arguments use DSN syntax; if COPY is yes, --dest defaults to the key’s value  
from --source. For more details, please use the --help option, or try ‘perldoc  
/usr/bin/pt-archiver’ for complete documentation.

Thanks  
Sumit Kumar

---

<div class="post-metadata">

### Author: ![Yunus](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus/32/6430_2.png) [@Yunus](https://forums.percona.com/u/Yunus)
#### Post date: [September 1, 2024, 2:02pm UTC](https://forums.percona.com/t/errors-in-command-line-arguments/32828/2 "2024-09-01T14:02:49Z")

</div>

> [@SumitKumar](#):
>
> [root@DELGEMIDACRMDB1UAT dump]# pt-archiver --source h=localhost,u= **,p='**',D=bid\_draft\_testing31082024,t=bid\_item\_consignee --where ‘bic\_bid\_id in (select b\_id from bids join bid\_attributes on b\_id = ba\_bid\_id where ba\_created\_on \<= ‘2024-02-08 00:00:00’ and b\_status=0)’ --no-check-charset --limit=5000 --commit-each --file /dump/%Y-%m-%d-%D.%t 2\>\> /dump/arch.err  
> Usage: pt-archiver [OPTIONS] --source DSN --where WHERE

Seems your where clause does not have proper quotations.  
It would help if you tried something like this

```auto
pt-archiver --source h=localhost,u=root,D=bid_draft_testing31082024,t=bid_item_consignee --ask-pass \
--where "bic_bid_id IN (SELECT b_id FROM bids JOIN bid_attributes ON b_id = ba_bid_id WHERE ba_created_on <= '2024-02-08 00:00:00' AND b_status=0)" \
--no-check-charset --limit=5000 --commit-each --file '/dump/%Y-%m-%d-%D.%t' --dry-run2>> /dump/arch.err

```

There is --ask-pass option if you want to provide a password in command line.

You can also add --dry-run to test if the command is good.  
To execute just remove --dry-run
