Skip to content

Commit

Permalink
Changes to the release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
d2r2 committed Sep 13, 2020
1 parent 46e5e08 commit 2a12186
Show file tree
Hide file tree
Showing 64 changed files with 1,748 additions and 706 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.pprof
gorsync
go-rsync
packaging/fpm_packages/packages/*
__debug_bin
packaging/build_packages/packages/*
data/assets_vfsdata.go
data/generate/generate
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "Launch program (dev)",
"type": "go",
"request": "launch",
"mode": "exec",
"program": "${workspaceFolder}/gorsync",
"preLaunchTask": "Build program DEV",
},
]
}
51 changes: 51 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build program DEV",
"type": "shell",
"command": "${workspaceFolder}/gorsync_build.sh",
"options": {
"env": {
"GOPATH": "${config:go.gopath}"
},
"cwd": "${workspaceFolder}"
}
},
{
"label": "Build program PROD",
"type": "shell",
"command": "${workspaceFolder}/gorsync_build.sh --buildtype Release",
"options": {
"env": {
"GOPATH": "${config:go.gopath}"
},
"cwd": "${workspaceFolder}"
}
},
{
"label": "Create archive package (with sources)",
"type": "shell",
"command": "${workspaceFolder}/packaging/build_packages/create_archive_source_package.sh",
"options": {
"env": {
"GOPATH": "${config:go.gopath}"
},
"cwd": "${workspaceFolder}/packaging/build_packages"
}
},
{
"label": "Create installation packages (archlinux, redhat, debian, freebsd)",
"type": "shell",
"command": "${workspaceFolder}/packaging/build_packages/create_distrib_packages_with_fpm.sh",
"options": {
"env": {
"GOPATH": "${config:go.gopath}"
},
"cwd": "${workspaceFolder}/packaging/build_packages"
}
}
],
}
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Find absolute path where Makedef resides with no difference how
# make utility is started (by current path, either with -C option).
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
# Take directories part path from absolute path to Makedef file.
mkfile_dir := $(dir $(mkfile_path))
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
GOCMD=go
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
BINARY_NAME=gorsync
# Always reassign GOPATH here, because Makedef is used not only here, but in source archive file
# compile mode too. Move up by 4 folders from current dir to setup GOPATH as a point
# to root folder where src, bin, pkg folders are resided.
GOBUILD=eval 'GOPATH=$(mkfile_dir)../../../.. ./gorsync_build.sh --buildtype Release --output $(PWD)/$(BINARY_NAME)'
# GOBUILD=eval 'GOPATH=$(PWD) ./gorsync_build.sh --buildtype Release'

all: build

# Used for some debugging only.
print:
$(eval GOPATH=$(shell bash -c 'echo ${PWD%/*/*/*}'))
echo $(GOPATH)
$(eval GOPATH=$(shell bash -c "echo ${PWD}"))
echo $(GOPATH)
echo ../..$(GOPATH)
# echo '${PWD%/*/*/*}'

# Main build entry
build:
$(GOBUILD)

# Delete application binary from current folder and from $GOPATH/bin (if present).
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)

67 changes: 34 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,29 @@ Gorsync Backup: GTK+ RSYNC frontend
[![Build Status](https://travis-ci.org/d2r2/go-rsync.svg?branch=master)](https://travis-ci.org/d2r2/go-rsync)
[![Go Report Card](https://goreportcard.com/badge/github.com/d2r2/go-rsync)](https://goreportcard.com/report/github.com/d2r2/go-rsync)
[![GoDoc](https://godoc.org/github.com/d2r2/go-rsync?status.svg)](https://godoc.org/github.com/d2r2/go-rsync)
[![GPLv3 License](http://img.shields.io/badge/License-GPLv3-yellow.svg)](./LICENSE)
[![Release](https://img.shields.io/github/v/release/d2r2/go-rsync.svg)](https://github.com/d2r2/go-rsync/releases/latest)
[![Last Commit](https://img.shields.io/github/last-commit/d2r2/go-rsync.svg)](https://github.com/d2r2/go-rsync/commit)
[![GPLv3 License](https://img.shields.io/badge/License-GPLv3-yellow.svg)](./LICENSE)

ANNOUNCEMENT: Translation to local languages wanted!!! Please read [collaboration and contribution](#collaboration-and-contribution).
----------

About
------------
-----

Gorsync Backup is a GTK+ frontend for brilliant [RSYNC](https://download.samba.org/pub/rsync/rsync.html) console utility. Written completely in [Go programming language](https://golang.org/), provides responsive GUI design and intuitive interface.

Gorsync Backup is not an all-purpose RSYNC wrapper. It was created to keep in mind how to do regular backup of your personal data from home NAS (either small business file server with RSYNC service enabled) with minimal effort. Gorsync Backup doesn't implement user interface for any possible RSYNC option and case, but use all the best from powerful RSYNC utility to perform regular data backup easily and quickly.

If you do not want to pay monthly fee for cloud space to backup your personal data to the cloud, but instead prefer to buy inexpensive mass-market 2-4 TB portable external hard drive, then your average backup scheme will looks like: attach USB hard drive to workstation/notebook with desktop Linux OS, start Gorsync Backup application, choose backup profile (once configured), run the backup process and you can go and enjoy your coffee cup.
If you do not want to pay monthly fee for cloud space to backup your personal data to the cloud, but instead prefer to buy inexpensive mass-market 1-4 TB portable external hard drive (and your data fits there), then your average backup scheme will looks like: attach USB hard drive to workstation/notebook with desktop Linux OS, start Gorsync Backup application, choose backup profile (once configured), run the backup process and you can go and enjoy your coffee cup.

The application will do the rest: estimate size of data to backup, display extensive progress information and once it done report about completion. If this is not your first backup, then application will significantly speed up backup process, because it keeps previous backup history in destination location and has "deduplication" capabilities, which allows the application do not copy over the network data that was backed up in previous sessions (withal it saves a lot of space): in my experience repeated backup of whole photography archive which exceed 650 GB from my home NAS with new pictures from last few months, takes 15 minutes.


Features and benefits
----------------------

* Multiple backup profiles are supported. Moreover, each profile can be configured to get data from multiple RSYNC sources/modules. Password protected RSYNC modules supported.
* Multiple backup profiles supported. Moreover, each profile can be configured to get data from multiple RSYNC sources/modules. Password protected RSYNC modules supported.
* 2-pass backup session approach to estimated backup volume in 1st pass. Display predicted time of completion in 2nd pass.
* Demonstrate "deduplication" on modern file systems, once previous backup sessions found (and significant time reduction in repeated backup processes). Works if backup destination is ext3/ext4/NTFS (employ file system hardlink feature).
* [Improved GOTK3+](https://github.com/d2r2/gotk3) library (GTK+ golang bindings) used for GUI.
Expand All @@ -43,7 +45,6 @@ Preferences:




Installation approaches
-----------------------

Expand All @@ -65,33 +66,46 @@ $ sudo ./gs_schema_install.sh
```
* Finally, run app from terminal:
```bash
$ ./gorsync_run.sh
$ ./gorsync_run.sh --buildtype Release|Development
```
, either compile application binary:
```bash
$ ./gorsync_build.sh --buildtype Release|Development
```
, where the main difference in Release/Development options is that `Release` will embed external resources (translation files, icons and the like) to the binary, but `Development` will not.


#### Precompiled linux packages (deb, rpm and others) from releases.

Alternative approach to install application is to downloads installation packages from latest release, which can be found in [release page](https://github.com/d2r2/go-rsync/releases). You may find there packages for deb (Debian, Ubuntu), rpm (Fedora, Centos, Redhat) and pkg.tar.xz (Arch linux) Linux distributives.
Alternative approach to install application is to downloads installation packages from latest release, which can be found in [release page](https://github.com/d2r2/go-rsync/releases). You may find there packages for deb (Debian, Ubuntu), rpm (Fedora, Centos, Redhat) and pkg.tar.xz (Arch linux) Linux distributives. Archive build file also available with `make` compile option.


#### Archlinux AUR repository.

One can be found in AUR repository https://aur.archlinux.org/ by name "gorsync-git" to download, compile and install latest release. On Archlinux you can use any AUR helper to install application, for instance `yaourt -S gorsync-git`.
One can be found in AUR repository https://aur.archlinux.org/ by name "gorsync-git" to download, compile and install latest release. On Archlinux you can use any AUR helper to install application, for instance `yay -S gorsync-git`.



Releases information
--------------------

#### [v0.3.3](https://github.com/d2r2/go-rsync/releases/tag/v0.3.3) (latest release):
#### [v0.4.0](https://github.com/d2r2/go-rsync/releases/tag/v0.4.0) (latest release):

* Minimal Makefile configuration to support [make](https://www.gnu.org/software/make/) build approach.
* Generate archive build file to bind to release assets, with 3rd party source dependencies injected to the `vendor` section of the project via [govendor](https://github.com/kardianos/govendor) tool. Since approach to use [govendor](https://github.com/kardianos/govendor) app is now considered obsolete, it will be replaced with Go modules ([go mod vendor](https://golang.org/ref/mod#go-mod-vendor)) in next releases.
* Get application version during compilation process from last GIT tag/release, rather than assigning the hardcoded one.
* Add .vscode folder to support development in Visual Studio Code as preferred IDE over Sublime Text. Configure launch.json settings to interactively run and debug application in VS Code. Additionally, configure tasks.json to run packaging scripts directly from the IDE.
* Small UI improvements.
* Adaptation to latest GLIB 2.64.
* Updated documentation and help.
* Bugs fixed.


#### [v0.3.3](https://github.com/d2r2/go-rsync/releases/tag/v0.3.3):

* RSYNC transfer options override implemented in profile settings.
* Lot of small UI improvements.
* Replace UI animation and customization implemented via imperative programming, with GTK+ CSS declarative application styling.
* Lot of UI improvements.
* Replace UI animation implemented via imperative programming, with GTK+ CSS declarative application styling.
* Both Linux and FreeBSD supported.
* Adaptation to latest GLIB 2.62, GTK+ 3.24.
* Updated documentation and help.
Expand All @@ -118,22 +132,10 @@ Releases information




Plans for future releases
-------------------------

Short list of preliminary anticipated features for next releases:

* More code comments and improved documentation.
* Installation packages for all major Linux distributives.




Gorsync Backup backup process description
Gorsync Backup backup process explanation
-----------------------------------------

As in regular [RSYNC](https://ss64.com/bash/rsync_options.html) session, Gorsync Backup is doing same job: copy files from one location (source) to another (backup destination).
As in regular [RSYNC](https://ss64.com/bash/rsync_options.html) session, Gorsync Backup is doing same job: copy files from one location (data source) to another (backup destination).

Gorsync Backup might be configured to copy from multiple RSYNC sources. It could be your pictures, movies, document's from home NAS, routers and smart Linux device configuration files (/etc/... folder) and so on... Thus Gorsync Backup profile let you specify multiple separated RSYNC URL sources to get data from in single backup session and combine them all together in one destination place.

Expand Down Expand Up @@ -161,7 +163,7 @@ In its turn, each backup folder has next regular structure:
```
, where `~backup_log~.log` file describe all the details about the steps occurred, including info/warning/error messages if any took place. `~backup_nodes~.signatures` file contains hash imprint for all source URLs, to detect in future backup sessions same data sets for "deduplication" activation (so, never delete this file from backup history, otherwise "deduplication" will not work for future backup sessions).

Gorsync Backup gives extra flexibility in copying data: you can configure application to skip copying some data from single RSYNC source. For this, you should place empty file in the folder with specific name `!!!__SKIPBACKUP__!!!` (name can be changed in preference), which instruct application not to copy specific folder content (including subfolders).
Gorsync Backup gives extra flexibility in copying data: you can configure application to skip copying some data from single RSYNC source. For this, you should place empty file in the folder with specific name `!!!__SKIPBACKUP__!!!` (name can be configured in preference), which instruct application do not copy specific folder content (including subfolders).

Gorsync Backup is splitting backup process to the peaces. The application in every backup session is trying to find optimal data block size to backup at once. To reach this application download folders structure in 1st pass to analyze how to divide the whole process into parts. Ordinary single data block size selected to be not less than 300 MB and not exceed 5 GB.

Expand All @@ -173,27 +175,24 @@ Once you start using Gorsync Backup on regular basis (monthly/weekly/daily), you

Be aware, that such legacy file systems as FAT, does not support "hard links", but successors, such as NTFS, ext3, ext4 and others have "hard links" supported (via low level file system "inode" concept). Hence no deduplication is possible for FAT. So, think in advance which file system to choose for your backup destination.

>*Note*: Gorsync Backup and RSYNC on its own has some limitations with "deduplication" - they can't track file renames and relocations inside backup directory tree to save space and time in the following backup sessions. This is not the application problem, it's RSYNC utility limitation. There is some experimental patches exist to get rid of this limitation, but not in the public RSYNC releases, which the application fully relies on: you can read [this](https://lincolnloop.com/blog/detecting-file-moves-renames-rsync/) and [this](http://javier.io/blog/en/2014/08/06/rsync-rename-move.html).
>*Note*: Gorsync Backup and RSYNC on its own have some limitations with "deduplication" functionality - they can't track file renames and relocations inside backup directory tree to save space and time in the following backup sessions. This is not a problem of the application itself, it's RSYNC utility limitation. There is some experimental patches exist to get rid of this limitation, but not in the official RSYNC releases, which the application fully relies on: you can read [this](https://lincolnloop.com/blog/detecting-file-moves-renames-rsync/) and [this](https://javier.io/blog/en/2014/08/06/rsync-rename-move.html).
>*Note*: Remember, that changing RSYNC transfer options between backup sessions may affect deduplication behavior for same backup data set. For instance, just enabled "transfer file permissions" might eliminate deduplication, even when backup data from previous backup sessions are present (but was made with disabled "transfer file permissions" option). Using NTFS file system in destination and having "transfer file permissions" option enabled, may cause that deduplication will not work in some cases.
>*Note*: Remember, that changing RSYNC transfer settings between backup sessions may affect deduplication behavior for same backup data set. For instance, just enabled "transfer file permissions" might eliminate deduplication, even when backup data from previous backup sessions are present (but was made with disabled "transfer file permissions" option). Using NTFS file system in destination and having "transfer file permissions" option enabled, may cause that deduplication will not work in some cases.


Collaboration and contribution
------------------------------

If you want to contribute to the project, please, read:

* User interface translation and localization required. Any help is appreciated to translate application to local languages (so far only English and Russian are supported). Use `./data/assets/translate.en.toml` file as an English language source for new language translation. You should modify each section/paragraph value in the file written in [TOML](https://en.wikipedia.org/wiki/TOML) format, for instance:
User interface translation and localization required. Any help is appreciated to translate application to local languages (so far only English and Russian are supported). Use `./data/assets/translate.en.toml` file as an English language source for new language translation. You should modify each section/paragraph value in the file written in [TOML](https://en.wikipedia.org/wiki/TOML) format, for instance:
```toml
[AboutDlgDoNotShowCaption]
other = "Do not show this information at application startup"

[PrefDlgProfileNameExistsWarning]
other = "Profile with name \"{{.ProfileName}}\" already exists. Please, correct the name"
```
, to get in the end translated version (do not translate identifiers in double brackets {{...}}). Finally, change "en" suffix in the file name to corresponding language code, and propose translation via project pull request, either mail file directly to denis.dyakov@gmail.com. If you still have any question, please, let me know.
* Ready to discuss proposals regarding application improvement and further development.
, to get in the end translated version (do not translate identifiers in double brackets {{...}}). Finally, change "en" suffix in the file name to corresponding language code, and propose translation via github project pull request, either mail file directly to denis.dyakov@gmail.com. If you still have any question, please, let me know.



Expand All @@ -207,4 +206,6 @@ Please use [Github issue tracker](https://github.com/d2r2/go-rsync/issues) for f
License
-------

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Gorsync Backup is licensed under [GNU GENERAL PUBLIC LICENSE version 3](https://raw.github.com/d2r2/go-rsync/master/LICENSE) by Free Software Foundation, Inc.
11 changes: 11 additions & 0 deletions backup/abstract.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
//--------------------------------------------------------------------------------------------------
// This file is a part of Gorsync Backup project (backup RSYNC frontend).
// Copyright (c) 2017-2020 Denis Dyakov <denis.dyakov@gmail.com>
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//--------------------------------------------------------------------------------------------------

package backup

import (
Expand Down
Loading

0 comments on commit 2a12186

Please sign in to comment.