Repository navigation
Overview
This release extends cluster backup and restore: tt backup-id generates backup identifiers, tt backup start and finalize gain --dir and iproto TLS flags, and tt restore can restore a subset of replicasets into separate snapshot, WAL and vinyl directories. It also parallelizes tt status and fixes duplicated lines and stalls in tt log -f after log rotation.
Added
tt backup-id: prints an identifier for a new backup, the current UTC time as20060102T150405Z, to pass as--backup-idtott backup start,uploadandfinalize. Identifiers sort in the order they are generated, and the command exits once the printed second is over, so two consecutive calls never print the same one.status: added--instance-timeoutflag to bound how long collecting a single instance's status may take.tt restore apply: restore into the three data directories Tarantool configures separately.--snapshot-dir,--wal-dirand--vinyl-dirname one directory each, and-c/--configwith--instancereads them out of a cluster configuration, resolvingsnapshot.dir,wal.dir,vinyl.dir, theirvar/lib/{{ instance_name }}defaults andprocess.work_dirthe way Tarantool does. Each directory is decided on its own, taking the flag that names it, else the configuration, else--work-dir. The marker is written beside the snapshot directory as<absolute snapshot directory>.restore_state.jsonand records all three, resolved.tt backup start/tt backup finalize: added--dirflag to choose the directory of the local archive and manifest fragment instead of$TMPDIR/tt-backup/<backup-id>.tt backup start/tt backup finalize: added--sslkeyfile,--sslcertfile,--sslcafileand--sslciphersflags to connect to an instance with iproto TLS enabled.tt restore plan: added--replicasetsto restrict the restore to the named replicasets, by the names the cluster config gives them, which is why it requires-c. The cluster recovery point is then searched over those replicasets alone, and so are the downloads, the restore targets and the trim positions. The others -- a stateless router, say -- are not restored and are reported in the warnings.
Changed
status: status requests now have a default timeout of 5 seconds.status: status requests were parallelized for faster collection.tt restore apply:--work-diris no longer required. It still puts every kind of file in one directory when used alone; with--configit is the directory the instance is launched from, which the configuration's relative paths resolve against. A call that does not add up to three directories is rejected with exit code 3 and touches nothing.tt backup/tt restore apply: a memtx sort data file (<signature>.sortdata, Tarantool 3.8+) counts as a snapshot, so it is backed up againstmemtx_dirand restored beside the snapshot it belongs to.--target-pointdrops the sort data of a snapshot it drops, instead of leaving a file describing a snapshot that is no longer there.tt log -f/tt tcm log --follow: only complete lines are printed. A half-written line stays buffered until its newline arrives instead of being split into two records.- Commands working with a Tarantool 3 application (
tt start,tt statusand others) read its cluster configuration once instead of once per instance, which was slow on applications with hundreds of instances.
Fixed
status: replication errors were ignored.tt backup start: an archive entry is named against the data directory that holds files of its own kind, so an instance keeping one data directory inside another no longer names a vinyl run againstwal_dirand has it restored a level too deep.tt restore applynormalizes the names older archives carry, so a backup already taken from such an instance restores correctly too.tt cluster publish/tt cluster show: fix a connection timeout to anhttps://Tarantool Config Storage or etcd endpoint with SSL enabled but no client certificate configured.tt log -f/tt tcm log --follow: a line could be delivered twice right after a log rotation, and the follow could stall, never picking up the rotated file.tt log -f: the message about an unavailable log file printed%!q(MISSING)instead of the file name.