Skip to content

Releases: ctomkow/tto

Release 0.5.1

02 Jan 19:13
Compare
Choose a tag to compare
Release 0.5.1 Pre-release
Pre-release

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

06 Nov 23:35
Compare
Choose a tag to compare
Release 0.5.0 Pre-release
Pre-release

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 keyword ssh_key specifies the full path to the private SSH key. The key must be encrypted, it will be decrypted with the specified pass value. The receiver can leave the ssh_key blank.

Issues

  • Host key checking is broken. Currently ignoring the check for now.

Release 0.4.1

26 Sep 21:39
Compare
Choose a tag to compare
Release 0.4.1 Pre-release
Pre-release

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, forcing scp to write it's buffer. According to scp.c, buffer is COPY_BUFLEN 16384. Therefore, the SQL comment tacked on is an order of magnitude bigger than the current COPY_BUFLEN. 163kB of overhead.

Release 0.4.0

25 Sep 23:46
Compare
Choose a tag to compare
Release 0.4.0 Pre-release
Pre-release

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 the mysqldump 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 the scp cmd on remote, resulting in an error code 1.

Release 0.3.2

25 Sep 00:55
bd3e886
Compare
Choose a tag to compare
Release 0.3.2 Pre-release
Pre-release

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

18 Sep 22:11
Compare
Choose a tag to compare
Release 0.3.1 Pre-release
Pre-release

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

05 Sep 23:53
Compare
Choose a tag to compare
Release 0.3.0 Pre-release
Pre-release

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

05 Sep 19:56
Compare
Choose a tag to compare
Release 0.2.3 Pre-release
Pre-release

Fixes

  • Added an exec.Wait() to ensure the child processes spawned for mysqldump are killed correctly. Previously, the app created a new mysqldump zombie process every time a dump was created.

Release 0.2.2

19 Aug 22:50
Compare
Choose a tag to compare
Release 0.2.2 Pre-release
Pre-release

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

16 Aug 23:40
Compare
Choose a tag to compare
Release v0.2.1 Pre-release
Pre-release

Fixes

  • Fixed the daemon not running via systemd. I broke it when I introduced the fg command. Now the fg command is properly installed into the system manager file that is created
  • Removed the start stop and status 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?