Skip to content

Commit

Permalink
change go.mod to allow `go install github.com/Altinity/clickhouse-bac…
Browse files Browse the repository at this point in the history
…kup@latest`
  • Loading branch information
Slach committed Jan 24, 2024
1 parent dea2960 commit e0cb727
Show file tree
Hide file tree
Showing 37 changed files with 130 additions and 129 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
IMPROVEMENTS
- refactoring of `create` command to allow parallel execution of `FREEZE` and `UNFREEZE` and table level parallelization `object_disk.CopyObject`
- add `CLICKHOUSE_MAX_CONNECTIONS` config parameter to allow parallel execution `FREEZE` / `UNFREEZE`
- change go.mod to allow `go install github.com/Altinity/clickhouse-backup@latest`

# v2.4.19
BUG FIXES
Expand Down
4 changes: 2 additions & 2 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ docker run -u $(id -u clickhouse) --rm -it --network host -v "/var/lib/clickhous
altinity/clickhouse-backup --help
```

Build from the sources:
Build from the sources (required go 1.21+):

```shell
GO111MODULE=on go get github.com/Altinity/clickhouse-backup/cmd/clickhouse-backup
go install github.com/Altinity/clickhouse-backup/cmd/clickhouse-backup@latest
```

## Brief description how clickhouse-backup works
Expand Down
10 changes: 5 additions & 5 deletions cmd/clickhouse-backup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"os"
"strings"

"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/logcli"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/logcli"
"github.com/Altinity/clickhouse-backup/v2/pkg/status"

"github.com/Altinity/clickhouse-backup/pkg/backup"
"github.com/Altinity/clickhouse-backup/pkg/server"
"github.com/Altinity/clickhouse-backup/v2/pkg/backup"
"github.com/Altinity/clickhouse-backup/v2/pkg/server"

"github.com/apex/log"
"github.com/urfave/cli"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Altinity/clickhouse-backup
module github.com/Altinity/clickhouse-backup/v2

require (
cloud.google.com/go/storage v1.35.1
Expand Down
8 changes: 4 additions & 4 deletions pkg/backup/backuper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"path"

"github.com/Altinity/clickhouse-backup/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/resumable"
"github.com/Altinity/clickhouse-backup/pkg/storage"
"github.com/Altinity/clickhouse-backup/v2/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/resumable"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage"

apexLog "github.com/apex/log"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/backup/backuper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"reflect"
"testing"

"github.com/Altinity/clickhouse-backup/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
)

type testVersioner struct {
Expand Down
22 changes: 11 additions & 11 deletions pkg/backup/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/storage"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage"
"golang.org/x/sync/errgroup"
"os"
"path"
Expand All @@ -17,15 +17,15 @@ import (
"sync/atomic"
"time"

"github.com/Altinity/clickhouse-backup/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/pkg/common"
"github.com/Altinity/clickhouse-backup/pkg/filesystemhelper"
"github.com/Altinity/clickhouse-backup/pkg/keeper"
"github.com/Altinity/clickhouse-backup/pkg/metadata"
"github.com/Altinity/clickhouse-backup/pkg/partition"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/Altinity/clickhouse-backup/pkg/storage/object_disk"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/v2/pkg/common"
"github.com/Altinity/clickhouse-backup/v2/pkg/filesystemhelper"
"github.com/Altinity/clickhouse-backup/v2/pkg/keeper"
"github.com/Altinity/clickhouse-backup/v2/pkg/metadata"
"github.com/Altinity/clickhouse-backup/v2/pkg/partition"
"github.com/Altinity/clickhouse-backup/v2/pkg/status"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage/object_disk"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"

apexLog "github.com/apex/log"
"github.com/google/uuid"
Expand Down
2 changes: 1 addition & 1 deletion pkg/backup/create_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package backup
import (
"context"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/Altinity/clickhouse-backup/v2/pkg/status"
)

func (b *Backuper) CreateToRemote(backupName, diffFrom, diffFromRemote, tablePattern string, partitions []string, schemaOnly, backupRBAC, rbacOnly, backupConfigs, configsOnly, skipCheckPartsColumns, resume bool, version string, commandId int) error {
Expand Down
12 changes: 6 additions & 6 deletions pkg/backup/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"strings"
"time"

"github.com/Altinity/clickhouse-backup/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/pkg/custom"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/Altinity/clickhouse-backup/pkg/storage"
"github.com/Altinity/clickhouse-backup/pkg/storage/object_disk"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/v2/pkg/custom"
"github.com/Altinity/clickhouse-backup/v2/pkg/status"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage/object_disk"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"

apexLog "github.com/apex/log"
"github.com/pkg/errors"
Expand Down
22 changes: 11 additions & 11 deletions pkg/backup/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/custom"
"github.com/Altinity/clickhouse-backup/pkg/filesystemhelper"
"github.com/Altinity/clickhouse-backup/pkg/partition"
"github.com/Altinity/clickhouse-backup/pkg/resumable"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/Altinity/clickhouse-backup/v2/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/custom"
"github.com/Altinity/clickhouse-backup/v2/pkg/filesystemhelper"
"github.com/Altinity/clickhouse-backup/v2/pkg/partition"
"github.com/Altinity/clickhouse-backup/v2/pkg/resumable"
"github.com/Altinity/clickhouse-backup/v2/pkg/status"
"github.com/eapache/go-resiliency/retrier"
"io"
"io/fs"
Expand All @@ -26,10 +26,10 @@ import (

"golang.org/x/sync/errgroup"

"github.com/Altinity/clickhouse-backup/pkg/common"
"github.com/Altinity/clickhouse-backup/pkg/metadata"
"github.com/Altinity/clickhouse-backup/pkg/storage"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/common"
"github.com/Altinity/clickhouse-backup/v2/pkg/metadata"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"

apexLog "github.com/apex/log"
)
Expand Down
12 changes: 6 additions & 6 deletions pkg/backup/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"strings"
"text/tabwriter"

"github.com/Altinity/clickhouse-backup/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/pkg/custom"
"github.com/Altinity/clickhouse-backup/pkg/metadata"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/Altinity/clickhouse-backup/pkg/storage"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/v2/pkg/custom"
"github.com/Altinity/clickhouse-backup/v2/pkg/metadata"
"github.com/Altinity/clickhouse-backup/v2/pkg/status"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"

apexLog "github.com/apex/log"
)
Expand Down
18 changes: 9 additions & 9 deletions pkg/backup/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/keeper"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/Altinity/clickhouse-backup/pkg/storage/object_disk"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/keeper"
"github.com/Altinity/clickhouse-backup/v2/pkg/status"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage/object_disk"
"golang.org/x/sync/errgroup"
"io/fs"
"net/url"
Expand All @@ -20,14 +20,14 @@ import (
"sync/atomic"
"time"

"github.com/Altinity/clickhouse-backup/pkg/common"
"github.com/Altinity/clickhouse-backup/v2/pkg/common"

"github.com/mattn/go-shellwords"

"github.com/Altinity/clickhouse-backup/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/pkg/filesystemhelper"
"github.com/Altinity/clickhouse-backup/pkg/metadata"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/v2/pkg/filesystemhelper"
"github.com/Altinity/clickhouse-backup/v2/pkg/metadata"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"
apexLog "github.com/apex/log"
recursiveCopy "github.com/otiai10/copy"
"github.com/yargevad/filepathx"
Expand Down
10 changes: 5 additions & 5 deletions pkg/backup/table_pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/partition"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/partition"
apexLog "github.com/apex/log"
"github.com/google/uuid"
"io"
Expand All @@ -17,10 +17,10 @@ import (
"sort"
"strings"

"github.com/Altinity/clickhouse-backup/pkg/common"
"github.com/Altinity/clickhouse-backup/pkg/filesystemhelper"
"github.com/Altinity/clickhouse-backup/v2/pkg/common"
"github.com/Altinity/clickhouse-backup/v2/pkg/filesystemhelper"

"github.com/Altinity/clickhouse-backup/pkg/metadata"
"github.com/Altinity/clickhouse-backup/v2/pkg/metadata"
)

type ListOfTables []metadata.TableMetadata
Expand Down
18 changes: 9 additions & 9 deletions pkg/backup/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ import (
"sync/atomic"
"time"

"github.com/Altinity/clickhouse-backup/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/pkg/custom"
"github.com/Altinity/clickhouse-backup/pkg/resumable"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/Altinity/clickhouse-backup/pkg/storage"
"github.com/Altinity/clickhouse-backup/v2/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/v2/pkg/custom"
"github.com/Altinity/clickhouse-backup/v2/pkg/resumable"
"github.com/Altinity/clickhouse-backup/v2/pkg/status"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage"
"github.com/eapache/go-resiliency/retrier"

"golang.org/x/sync/errgroup"

"github.com/Altinity/clickhouse-backup/pkg/common"
"github.com/Altinity/clickhouse-backup/pkg/filesystemhelper"
"github.com/Altinity/clickhouse-backup/pkg/metadata"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/common"
"github.com/Altinity/clickhouse-backup/v2/pkg/filesystemhelper"
"github.com/Altinity/clickhouse-backup/v2/pkg/metadata"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"
apexLog "github.com/apex/log"
"github.com/yargevad/filepathx"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/backup/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package backup
import (
"context"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/server/metrics"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/server/metrics"
"github.com/Altinity/clickhouse-backup/v2/pkg/status"
apexLog "github.com/apex/log"
"github.com/urfave/cli"
"regexp"
Expand Down
6 changes: 3 additions & 3 deletions pkg/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"database/sql"
"errors"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/common"
"github.com/Altinity/clickhouse-backup/v2/pkg/common"
"github.com/ClickHouse/clickhouse-go/v2/lib/driver"
"github.com/antchfx/xmlquery"
"os"
Expand All @@ -18,8 +18,8 @@ import (
"strings"
"time"

"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/metadata"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/metadata"
"github.com/ClickHouse/clickhouse-go/v2"
apexLog "github.com/apex/log"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/clickhouse/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"

"github.com/Altinity/clickhouse-backup/pkg/metadata"
"github.com/Altinity/clickhouse-backup/v2/pkg/metadata"
)

// GetBackupTablesLegacy - return list of backups of tables that can be restored
Expand Down
4 changes: 2 additions & 2 deletions pkg/custom/delete_custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package custom
import (
"context"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"
"github.com/apex/log"
"time"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/custom/download_custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package custom
import (
"context"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"
"github.com/apex/log"
"github.com/eapache/go-resiliency/retrier"
"time"
Expand Down
6 changes: 3 additions & 3 deletions pkg/custom/list_custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/storage"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/storage"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"
"github.com/apex/log"
"strings"
"time"
Expand Down
4 changes: 2 additions & 2 deletions pkg/custom/upload_custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package custom
import (
"context"
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/config"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/config"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"
"github.com/apex/log"
"github.com/eapache/go-resiliency/retrier"
"time"
Expand Down
8 changes: 4 additions & 4 deletions pkg/filesystemhelper/filesystemhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package filesystemhelper

import (
"fmt"
"github.com/Altinity/clickhouse-backup/pkg/utils"
"github.com/Altinity/clickhouse-backup/v2/pkg/utils"
"net/url"
"os"
"path"
Expand All @@ -12,9 +12,9 @@ import (
"syscall"
"time"

"github.com/Altinity/clickhouse-backup/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/pkg/common"
"github.com/Altinity/clickhouse-backup/pkg/metadata"
"github.com/Altinity/clickhouse-backup/v2/pkg/clickhouse"
"github.com/Altinity/clickhouse-backup/v2/pkg/common"
"github.com/Altinity/clickhouse-backup/v2/pkg/metadata"
apexLog "github.com/apex/log"
)

Expand Down
Loading

0 comments on commit e0cb727

Please sign in to comment.