Releases: ctomkow/tto
Releases · ctomkow/tto
Release 0.5.1
Fixes
- Changed the filename delimiter from
-
to_-_
. This is a more unique delimiter. Previously if the database name had a-
in it, the dump and restore would fail.
Release 0.5.0
Fixes
- Addressed regression introduced from the fall refactoring of the database structure. Now the program transfers the db dumps correctly. Before it would segfault after the transfer was done.
- Fixed regression where the database dump was not writing the timestamp into the file name.
Features
- Added SSH key support. Now in the
System
level of conf.json the keywordssh_key
specifies the full path to the private SSH key. The key must be encrypted, it will be decrypted with the specifiedpass
value. The receiver can leave thessh_key
blank.
Issues
- Host key checking is broken. Currently ignoring the check for now.
Release 0.4.1
Fixes
- Resolved an issue where the tail end of the backup doesn't get written to file on the remote host. This is due to it staying in
scp
buffer. This is due to not being able to specify the file size (because we don't know it beforehand). To solve this, a valid SQL comment is appended to the end of the backup, forcingscp
to write it's buffer. According toscp.c
, buffer isCOPY_BUFLEN 16384
. Therefore, the SQL comment tacked on is an order of magnitude bigger than the currentCOPY_BUFLEN
. 163kB of overhead.
Release 0.4.0
Fixes
- Various refactoring and renaming
Features
- Streams the database dump to the remote without copying the whole dump into memory first. Greatly reduces memory footprint as ioutl.ReadAll is quite heavy resulting in a 2x memory footprint as opposed to actual dump size.
Issues
- Unable to catch any errors when
scp
is run on the remote machine. This is due to feeding it a maximum file size, not the actual file size. Since we are streaming themysqldump
stdout directly to remote, we don't know the total size beforehand. Then, when the ssh session is closed after transfer is complete, it forcefully ends thescp
cmd on remote, resulting in anerror code 1
.
Release 0.3.2
Fixes
- Eliminated a double copying of the database dump which resulted in double memory usage. This also reduced IOPS as it wrote to a file, then read it again. Silly, I know. Now, the dump is only read to memory once with no file IO. Ultimately, I want to stream the dump to the remote host without needing to buffer the whole dump in memory.
Release 0.3.1
Fixes
- Fixed bug that caused the app to silently fail when the sender loses connection with the remote host (receiver).
- The app now tests the ssh connection every minute
- If connection is lost, app tries to re-connect 3 times with a 10 second delay.
- If app doesn't re-connect, it will try again 3 more times on the next ssh test interval
- Misc refactoring of the sender and receiver files
Release 0.3.0
Features
- Added two new configuration options in conf.json for the receiver:
exec_before
&&exec_after
.exec_before
: runs a local command before restoring the database.exec_after
: runs a local command after restoring the database.
The main reason for this was to be able to stop the application on the secondary system before the database restore, then start the application again after the restore was complete.
The first string of the array of strings needs to be the name of the command. Then, there can be any number of strings after as command arguments.
e.g.
["echo" "i am running before the db restore"]
["docker", "stop", "container"]
.
Release 0.2.3
Fixes
- Added an exec.Wait() to ensure the child processes spawned for
mysqldump
are killed correctly. Previously, the app created a newmysqldump
zombie process every time a dump was created.
Release 0.2.2
Fixes
- Added a max number of db connections, from the default of unlimited. Currently statically set to 10. Since parsing through the sql dump is a serial operation, we shouldn't care about many connections. Only if something goes wrong do we want to save the db.
Release v0.2.1
Fixes
- Fixed the daemon not running via systemd. I broke it when I introduced the
fg
command. Now thefg
command is properly installed into the system manager file that is created - Removed the
start
stop
andstatus
commands. These functions should be controlled by the system/process manager. This may be an opinionated decision...That's what pre-release is for right?