pingcap / dumpling

Dumpling is a fast, easy-to-use tool written by Go for dumping data from the database(MySQL, TiDB...) to local/cloud(S3, GCP...) in multifarious formats(SQL, CSV...).
Apache License 2.0
281 stars 85 forks source link

dumpling does not create directories by default #398

Closed glkappe closed 2 years ago

glkappe commented 2 years ago

What did you do?

tiup dumpling:v5.2.2 --host 172.16.4.210 --user root --port 24000 -o ./

What did you expect to see?

dumpling can automatically create a directory with a timestamp. For example, dumpling-20210101235959

What did you see instead?

A pile of scattered documents

Versions of the cluster

dumpling v5.2.2.

lichunzhu commented 2 years ago

Try tiup dumpling:v5.2.2 --host 172.16.4.210 --user root --port 24000 without specifying -o?

glkappe commented 2 years ago

Yes, a directory will be created at this time, export-2021-11-25T05:27:32Z But can the file name be replaced by dumpling-timestamp, the word export is not discernible

lichunzhu commented 2 years ago

Do you mean changing the default name template? I think we need a further discussion with others. For now, you can use -o ./dumpling-date "+%Y%m%d%H%M%S"

glkappe commented 2 years ago

Okay, please help with technical evaluation, thank you very much

lichunzhu commented 2 years ago

@sunzhaoyang could you please help take a look?

glorv commented 2 years ago

I wander how many users need this feature since it can be easily satisfied by a little shell skill. e.g. You can do this easily by type ...-o dump-`date +%Y%m%d%H%M%S`.

Would you mind learn a little shell instead @glkappe . 😅

lichunzhu commented 2 years ago

close this now. It's a feature request.