Mirror code depends on rm code which naturally prints delete messages,
this PR will make mirror uses its own delete code since it is simple
enough to do.
Also add size information to remove message
We don't use this fork of ours anymore and we don't need
to maintain it anymore as we haven't made any significant
changes to upstream code or fixed bugs.
Minio can return during deletion sometimes, like missing quorum,
but mc can block in that case. The reason is that Remove() in
client-s3 doesn't actively listen for errors reported by minio-go
RemoveObjects() API because that would also block this latter.
Implement profiling command to start & download profiling data of
a standalone or all nodes of a cluster.
```
1. Start CPU profiling
$ mc admin profiling start --type "cpu" myminio/
2. Download latest profiling data under save under profiling.zip
$ mc admin profiling stop myminio/
```
S3 lists 1000 objects in batches, but once this batch is being
processed to be copied over there is no way to lock across the
entire batch for mirroring. Due to this we introduce a scenario
when objects might have been deleted in parallel from another
application.
In such a scenario simply ignore such objects and proceed to
copy other files.
Fixes#2537
As unix cp command complains when you copy a directory into itself,
(such as `cp -r ~/Desktop/ ~/Desktop/sub/`), mc will follow the
same behavior with this commit.
The main reason is that copy or mirror command can be unpredictable
with the style of copy.
Example:
```
$ mc ls -r myminio/testbucket/
[2018-09-25 19:28:17 CET] 8B dir/object
[2018-09-25 19:28:40 CET] 8B object
$ mc -q cp -r myminio/testbucket/ myminio/testbucket/dir/
`myminio/testbucket/dir/object` -> `myminio/testbucket/dir/dir/object`
`myminio/testbucket/object` -> `myminio/testbucket/dir/object`
```
We can notice that `myminio/testbucket/dir/object` is both source and target
in the copy operation. The last copy operation that will occur will rule the
result of the total copy operation and `myminio/testbucket/dir/dir/object`
will have a different content in each copy operation.
Due to the unpredictability mentionned above, we will disallow copying or
mirroring a folder into itself.