15 Commits

Author SHA1 Message Date
Xiang Li
f59da0e453 *:fix point-in-time backup
Backup process should be able to read all WALs until io.EOF to
generate a point-in-time backup.

Our WAL file is append-only. And the backup process will lock all
files before start reading, which can prevent the gc routine from
removing any files in the middle.
2015-06-15 11:12:28 -07:00
Xiang Li
d3778b1286 etcdctl: backup tool should use the new layout 2015-04-14 11:49:54 -07:00
Yicheng Qin
e966e565c4 etcdctl/backup_command: handle datadir with missed snapshot mark
This helps to recover from the data dir created in v2.0.0-rc1.
2015-01-29 13:32:59 -08:00
Yicheng Qin
d0af96d558 etcdctl/backup_command: save snapshot mark in new wal 2015-01-29 12:35:39 -08:00
Jonathan Boulle
f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Yicheng Qin
07a69430c1 *: move etcdserver/idutil -> pkg/idutil 2015-01-13 11:54:51 -08:00
Yicheng Qin
84f62f21ee wal: record and check snapshot 2015-01-06 16:27:40 -08:00
Yicheng Qin
05c921229e etcdserver: add id generator 2014-12-29 13:03:04 -08:00
Xiang Li
53bf7e4b5e wal: rename openAtIndex -> open; OpenAtIndexUntilUsing -> openNotInUse 2014-12-14 19:33:06 -08:00
Xiang Li
f538cba272 *: do not backup files still in use 2014-12-14 19:27:22 -08:00
Yicheng Qin
7e6e305c4f Merge branch 'log_interface'
Conflicts:
	raft/raft.go
2014-11-25 14:22:11 -08:00
Owen Smith
dbb6a75e3f backup: Ensure dest snapshot dir always exists
Otherwise the SaveSnap operation fails
2014-11-25 16:57:18 +00:00
Owen Smith
9974bf0291 backup: Add fatal if dest snapshot failed
Errors are currently silently swallowed
2014-11-25 14:08:20 +00:00
Ben Darnell
355ee4f393 raft: Integrate snapshots into the raft.Storage interface.
Compaction is now treated as an implementation detail of Storage
implementations; Node.Compact() and related functionality have been
removed. Ready.Snapshot is now used only for incoming snapshots.

A return value has been added to ApplyConfChange to allow applications
to track the node information that must be stored in the snapshot.

raftpb.Snapshot has been split into Snapshot and SnapshotMetadata, to
allow the full snapshot data to be read from disk only when needed.

raft.Storage has new methods Snapshot, ApplySnapshot, HardState, and
SetHardState. The Snapshot and HardState parameters have been removed
from RestartNode() and will now be loaded from Storage instead.
The only remaining difference between StartNode and RestartNode is that
the former bootstraps an initial list of Peers.
2014-11-19 16:40:26 -05:00
Xiang Li
0d541e6338 *: add ctl backup support 2014-11-07 13:27:44 -08:00