Skip to content

Commit

Permalink
Release 1.0: Support for SSH tunnels (tested this time :-P)
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed May 4, 2018
1 parent 4fe4b59 commit 3f16a50
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 14 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,34 @@ to `semantic versioning`_.
.. _Keep a Changelog: http://keepachangelog.com/
.. _semantic versioning: http://semver.org/

`Release 1.0`_ (2018-05-04)
---------------------------

**Bug fix: SSH tunnel support actually works now :-P (backwards incompatible).**

This week I switched the backups of my VPS over to `rsync-system-backup`. The
biggest hurdle was the fact that I never finished nor tested support for SSH
tunnels in `rsync-system-backup` which I needed now:

- The command line interface didn't expose the functionality.
- Due to various bugs it wouldn't have worked even if the
functionality had been exposed.

The changes in this release:

- Added the ``-t``, ``--tunnel`` command line option.
- Integrated SSH tunnel support provided by `executor 19.3`_.
- Removed the ``ForwardedDestination`` class (this functionality has been
replaced by the new ``Destination.ssh_tunnel`` property).

Because the removal of ``ForwardedDestination`` is backwards incompatible I've
decided to bump the major version number. It's actually kind of fitting because
I've been using `rsync-system-backup` for local backups for months now and
that's working fine; the main thing missing was indeed SSH tunnel support :-).

.. _Release 1.0: https://github.com/xolox/python-rsync-system-backup/compare/0.11...1.0
.. _executor 19.3: http://executor.readthedocs.io/en/latest/changelog.html#release-19-3-2018-05-04

`Release 0.11`_ (2018-04-30)
----------------------------

Expand Down
40 changes: 30 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,23 @@ Status

While this project brings together more than ten years of experience in
creating (system) backups using rsync_, all of the actual Python code was
written in the first few months of 2017 and hasn't seen much real world use.

.. warning:: I'm releasing this project as alpha software and I probably wont
be changing that label until I've actually tried out each of the
(supposedly) supported use cases for a while :-).

Nevertheless there is already 94% test coverage and my intention is to extend
the test coverage further. Also I will be switching each of my existing ad-hoc
backup scripts over to this project in the first half of 2017, so I may very
likely be the first user running into any bugs :-).
written in the first few months of 2017 and has seen limited real world use.
The project does however have an automated test suite with more than 90% test
coverage and my intention is to extend the test coverage further.

In May 2018 I changed the status from alpha to beta as part of release 1.0. The
bump in major version number was triggered by a backwards incompatible code
change, however at that point I had been using `rsync-system-backup` to make
local backups of several of my Linux systems for the majority of a year. Also
several colleagues of mine have used the how-to on setting up unattended
backups to an encrypted USB disk.

.. warning:: Please use the ``--dry-run`` option when you're getting familiar
with how `rsync-system-backup` works and don't remove the option
until you're confident that you have the right command line,
because using `rsync-system-backup` in the wrong way can cause
data loss (for example by accidentally swapping the ``SOURCE``
and ``DESTINATION`` arguments).

Installation
------------
Expand Down Expand Up @@ -78,6 +85,11 @@ where the backup is stored, in the syntax of rsync's command line interface.
The optional SOURCE argument defaults to '/' which means the complete root
filesystem will be included in the backup (other filesystems are excluded).

Please use the ``--dry-run`` option when getting familiar with this program and
don't remove it until you're confident that you have the right command line,
because using this program in the wrong way can cause data loss (for example
by accidentally swapping the SOURCE and DESTINATION arguments).

Supported locations include:

- Local disks (possibly encrypted using LUKS).
Expand Down Expand Up @@ -145,6 +157,11 @@ The backup process consists of several steps:
If you want the backup process to run fully unattended you can configure a
key file in /etc/crypttab, otherwise you will be asked for the password
each time the encrypted filesystem is unlocked."
"``-t``, ``--tunnel=TUNNEL_SPEC``","Connect to an rsync daemon through an SSH tunnel. This provides encryption
for rsync client to daemon connections that are not otherwise encrypted.
The value of ``TUNNEL_SPEC`` is expected to be an SSH alias, host name or IP
address. Optionally a username can be prefixed (followed by '@') and/or a
port number can be suffixed (preceded by ':')."
"``-i``, ``--ionice=CLASS``","Use the 'ionice' program to set the I/O scheduling class and priority of
the 'rm' invocations used to remove backups. ``CLASS`` is expected to be one of
the values 'idle', 'best-effort' or 'realtime'. Refer to the man page of
Expand All @@ -156,6 +173,9 @@ The backup process consists of several steps:
"``-n``, ``--dry-run``","Don't make any changes, just report what would be done. This doesn't
create a backup or snapshot but it does run rsync with the ``--dry-run``
option."
"``-x``, ``--exclude=PATTERN``","Selectively exclude certain files from being included in the backup.
Refer to the rsync documentation for allowed ``PATTERN`` syntax. Note that
rsync-system-backup always uses the 'rsync ``--one-file-system``' option."
"``-f``, ``--force``","By default rsync-system-backup refuses to run on non-Linux systems because
it was designed specifically for use on Linux. The use of the ``-f``, ``--force``
option sidesteps this sanity check. Please note that you are on your own if
Expand Down
2 changes: 1 addition & 1 deletion rsync_system_backup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
)

# Semi-standard module versioning.
__version__ = '0.11'
__version__ = '1.0'

# Public identifiers that require documentation.
__all__ = (
Expand Down
7 changes: 6 additions & 1 deletion rsync_system_backup/cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# rsync-system-backup: Linux system backups powered by rsync.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: May 4, 2018
# Last Change: May 5, 2018
# URL: https://github.com/xolox/python-rsync-system-backup

"""
Expand All @@ -14,6 +14,11 @@
The optional SOURCE argument defaults to '/' which means the complete root
filesystem will be included in the backup (other filesystems are excluded).
Please use the --dry-run option when getting familiar with this program and
don't remove it until you're confident that you have the right command line,
because using this program in the wrong way can cause data loss (for example
by accidentally swapping the SOURCE and DESTINATION arguments).
Supported locations include:
- Local disks (possibly encrypted using LUKS).
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Setup script for the `rsync-system-backup' package.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: May 5, 2017
# Last Change: May 4, 2018
# URL: https://github.com/xolox/python-rsync-system-backup

"""
Expand Down Expand Up @@ -72,7 +72,7 @@ def get_absolute_path(*args):
]),
install_requires=get_requirements('requirements.txt'),
classifiers=[
'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
Expand Down

0 comments on commit 3f16a50

Please sign in to comment.