1
0
mirror of https://github.com/minio/mc.git synced 2025-11-12 01:02:26 +03:00
Commit Graph

82 Commits

Author SHA1 Message Date
Harshavardhana
4425378b37 mc: Code cleanup after running gosimple tool (#2065) 2017-03-08 10:48:45 +01:00
Anis Elleuch
8ce6f43e35 Stop mirror/diff when difference() sends error (#2049)
The caller of difference() now receives errors so it can
stop mirroring or difference calculation.
2017-03-01 11:06:26 -08:00
Anis Elleuch
55e010ca52 mirror: Return exit code after mirror/watch error (#2043) 2017-02-27 11:45:16 -08:00
Harshavardhana
1ef242a5c1 Fix all cli commands to have consistent UI (#2040)
Fixes #2038
2017-02-27 11:44:26 -08:00
Anis Elleuch
798775775b Use ` instead of unicode single quote (#2033)
‘ is not supported in some dumb terminals, use ` instead
2017-02-25 11:08:32 -08:00
Anis Elleuch
7483cdebfb mirror: Quit after showing all progressbar updates (#2020)
mc can quit when mirror terminates but progress bar is not able
to show all made progress. This commit makes mc waits until all updates
are sent to the status channel.
2017-02-17 12:10:01 -08:00
Harshavardhana
e7e44b96ee Avoid printing hidden flags and commands with custom help. (#2015)
Always use .VisibleFlags and .VisibleCommands in templates
to avoid printing hidden flags and commands in the help
template.
2017-02-15 02:05:29 -08:00
Anis Elleuch
ace3f452c3 mirror: Mirror buckets if only alias is specified (#2006) 2017-02-12 11:20:05 -08:00
Anis Elleuch
fb9d10772a help: Use {{.HelpName}} in help/examples template (#2013)
It is easier to use {{.HelpName}} in help text template to print
the mc binary name plus the whole command hierarchy (binary name +
command + subcommand, etc..)
2017-02-12 09:30:00 -08:00
Harshavardhana
5b74d8c444 Bring --watch option back for mirror to make scripting as default. (#2001) 2017-02-06 11:58:20 -08:00
Harshavardhana
cca8c10f33 mirror: For non-s3 make sure we copy and exit properly. (#1995) 2017-02-03 15:55:44 -08:00
Anis Elleuch
ad850412d2 lock: Update madmin pkg and use duration flag name (#1994)
* Use new errors format returned madmin APIs
* Use duration query name in Locks API
2017-02-01 12:19:27 -08:00
Anis Elleuch
4f0c2bf376 mirror: Avoid session and enable continuous mirror (#1992)
* Watch mode is enabled by default without specifying any flag
* Saving session is removed since mirror is incremental
* Remove the use of queue to simpliy the code
2017-01-31 09:39:39 -08:00
Anis Elleuch
085a1e512f flags: use IsSet to fetch for cli flags (#1969)
cli package fails to search for global flags when we use many level of subcommands. This PR uses context.IsSet() instead.
2017-01-19 11:25:35 -08:00
Harshavardhana
853fea16b4 Enable support for s3 transfer acceleration. (#1946)
Simply use

```
mc config host add s3-accel https://s3-accelerate.amazonaws.com <access_id> <secret_id>
```

This is all is needed, if you have buckets which has s3 acceleration
enabled it just works transparently.

Fixes #1912
2017-01-05 01:36:01 -08:00
Harshavardhana
282246fff2 mirror: --remove should properly remove files on target. (#1926)
This bug happened after rm-main was refactored.

Fixes https://github.com/minio/minio/issues/3432
2016-12-12 14:31:46 -08:00
Harshavardhana
64166319ee cp/diff/mirror: Cleanup code and deprecate unnecessary flags. (#1914)
This fix also fixes an apparent crash found in diff.

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4bdc07]

goroutine 84 [running]:
panic(0x810ea0, 0xc4200120e0)
        /home/builder/.gimme/versions/go1.7.3.linux.amd64/src/runtime/panic.go:500 +0x1a1
github.com/minio/mc/cmd.objectDifference.func1(0xc4200880a8, 0xc42042ee56, 0xc420315ec0, 0xc4200880b0, 0xc42042ee57, 0xc420315f20, 0xc42042ee54, 0xc42042ee55, 0xc420315501, 0xc4200880a0, ...)
        /home/builder/mygo/src/github.com/minio/mc/cmd/difference.go:109 +0x197
created by github.com/minio/mc/cmd.objectDifference
        /home/builder/mygo/src/github.com/minio/mc/cmd/difference.go:180 +0x2f5
```
2016-12-06 01:41:22 -08:00
Harshavardhana
1e48d10617 mirror: Avoid flushing session to disk on each i/o operation. (#1909)
The problem was for each read from statusCh we were writing
to session file again and also syncing to disk. This adds
severe performance problems.

Fixes #1908
2016-12-05 13:53:09 -08:00
Harshavardhana
df395786bd mc: Consistent exit codes across all commands. (#1895)
Also brings in much needed CLI changes from
upstream and backporting our custom changes on
top of those changes.

Fixes #1880
2016-11-27 12:35:59 +05:30
Harshavardhana
2412aae68f cp/mirror: Use proper paths for windows during copyObject. (#1897)
Fixes #1857
2016-11-27 12:26:02 +05:30
Harshavardhana
cf89d74561 Vendorize new minio-go code. (#1891)
This fixes #1889.

```sh
mc mirror -w
```

Now runs continous even when the source is not available.
Reconnects indefinitely in a binomially increasing fashion
and also allows jitter so that the retry has a nice
distribution as well.

This allows for 'mc mirror -w' to run continously without
further monitoring.
2016-11-20 16:31:53 -08:00
Harshavardhana
38aec4d875 mirror and cp should print size in --json mode. (#1890)
```sh
mc cp -r --json /usr/bin /tmp | jq .
...
...
{
  "status": "success",
  "source": "/usr/bin/gcm-viewer",
  "target": "/tmp/bin/gcm-viewer",
  "size": 87128,
  "totalCount": 2602,
  "totalSize": 677422730
}
```

This allows scripts to build progress around this data.
2016-11-20 14:46:24 -08:00
Bala FA
6de2b4559e Refactor rm command. (#1855)
This patch makes rm command to use minio-go.RemoveObjects() to removeobjects recursively.
2016-10-17 20:24:09 -07:00
Bala FA
0661f537cf update help messages of all commands. (#1856) 2016-10-17 20:18:55 -07:00
Anis Elleuch
d9b3f276b8 Fix remote path calcuation when continuously mirroring fs dir to any target (#1853) 2016-10-10 13:03:40 -07:00
Bala FA
75d55783c0 ls: fix incomplete listing for specific prefix (#1849)
Previously it was failing like below.

```
$ mc ls --incomplete myminio/mybucket
[2016-09-16 09:48:57 PDT] 576MiB 1.iso

$ mc ls --incomplete myminio/mybucket/1.iso
mc: <ERROR> Unable to initialize target ‘myminio/mybucket/1.iso’. Object key is missing, object key cannot be empty
```

This patch fixes this issue.
2016-10-04 17:19:05 -07:00
Bala FA
3094af8a5e rm: add timebased delete and object list from stdin (#1837)
* Add multi-delete support by taking object list from stdin
* Add support to `rm` to remove objects older than given time
* Add --prefix flag to differenciate prefix and target names.

Fixes #1827 #1828
2016-09-28 10:13:11 -07:00
Harshavardhana
c6a383590d mc: Do not print accounting with '--json' (#1815) 2016-09-01 20:13:49 -07:00
Anis Elleuch
fd34958ffa Add --insecure flag to skip certificate validation (#1814) 2016-09-01 18:36:00 -07:00
Harshavardhana
939dad5900 Move the notify events to new package - rjeczalik/notify. (#1807)
* Move the notify events to new package - rjeczalik/notify.

* improving handling of notify events on linux specific (#3) @nl5887
2016-08-24 02:11:55 -07:00
Harshavardhana
768be74f74 mirror: Fix progress bar for mirror server to server copy on same host. 2016-08-20 19:41:26 -07:00
Harshavardhana
2ea2ec90d2 Rename mc --> cmd 2016-08-17 18:26:18 -07:00