Skip to content

Conversation

@gozora
Copy link
Member

@gozora gozora commented Oct 24, 2016

  • introduced BORGBACKUP_PASSPHRASE, to send pass-phrase to Borg using environment variable
  • logic of Borg backup work-flow was reordered, now we are able to COPY_AS_IS_BORG keyfile to Relax-and-Recover rescue/recovery system
  • Introduced BORGBACKUP_REMOTE_PATH, which sets location of Borg binary on remote server. Borg can be now installed to arbitrary location
  • default encryption is now "none" (see comment)

@gozora
Copy link
Member Author

gozora commented Oct 24, 2016

Update of documentation will follow soon ...

@jsmeix
Copy link
Member

jsmeix commented Oct 24, 2016

@gozora
now you introduce some all-caps variables like
OPT_COMPRESSION, OPT_PRUNE, OPT_REMOTE_PATH,
and ARCHIVE_CACHE that I find nowhere else in current ReaR.

I assume these variables are currently only used for BORG
but they look as if they are intended for a more general
usage also for other backup methods because they
have no "BORG_" prefix.

I would like to know how those variables are meant to be used.

@jsmeix jsmeix added the enhancement Adaptions and new features label Oct 24, 2016
@jsmeix jsmeix added this to the Rear v1.20 milestone Oct 24, 2016
@jsmeix jsmeix self-assigned this Oct 24, 2016
@gozora
Copy link
Member Author

gozora commented Oct 24, 2016

I assume these variables are currently only used for BORG

Yes that is correct, scope for these variables is intended only for Borg. The reason why they are all caps is that I've try to follow ReaR conding style.
"All variables that are used in more than a single script must be all-caps:"
I've decided not to prefix them with BORGBACKUP_ as they are not intended to be configured by default.conf.

I can of course change them, so their use become more obvious.
Do you have any preference?

Thanks

V.

@jsmeix
Copy link
Member

jsmeix commented Oct 24, 2016

@gozora
all-caps is fine for me - but because that indicates some kind
of "global" usage (strictly speaking in more than one script)
I would prefer a prefix when it is "not so much global"
to indicate that it is only meant "global" for BORG.

For example we have already
BACKUP_PROG_COMPRESS_OPTIONS
and now the OPT_COMPRESSION may cause
some confusion what each one is about.

In contrast when you use BORG_OPT_COMPRESSION
or BORGBACKUP_OPT_COMPRESSION (as you like)
the distinction is clear.

Only some offhanded thoughts for the future:

Alternatively one could perhaps use the existing
BACKUP_PROG_COMPRESS_OPTIONS array
also for other backup methods like Borg Backup?

But currently default.conf states that
BACKUP_PROG_COMPRESS_OPTIONS
belongs only to "internal BACKUP stuff".

Perhaps this could become a good example how one
could use existing variables also for other backup methods?

If one likes to use BACKUP_PROG_COMPRESS_OPTIONS
also for other backup methods one would first of all need to
change ReaR so that the current default '--gzip' is no longer
set in default.conf so that it is empty there.
Then for each backup method its particular default
could be set in a script of each backup method if BACKUP_PROG_COMPRESS_OPTIONS is empty.
For each backup method a comment in default.conf
would tell about the default.

As far as I know currently the various backup methods
are implemented mostly separated from each other.
"Mostly" because e.g. 'tar' and 'rsync' both use
e.g. BACKUP_PROG_COMPRESS_OPTIONS, cf.
usr/share/rear/backup/NETFS/default/50_make_backup.sh

Perhaps it is better to keep different backup methods separated?
(I.e. avoid RFC 1925 item 5 and keep separated things separated.)

Perhaps it is better to do common things via same variables?
(E.g. see also #823)

Currently I don't know...

@gozora
Copy link
Member Author

gozora commented Oct 24, 2016

Perhaps it is better to keep different backup methods separated?
(I.e. avoid RFC 1925 item 5 and keep separated things separated.)

Perhaps it is better to do common things via same variables?
(E.g. see also #823)

In my opinion they should remain separated, it is maybe nicer to have one variable for multiple backups but, this can cause some trouble connected with introducing more and more complicated code when new features will be build into ReaR.

For new variable names (OPT_COMPRESSION and co.) I'll prefix them with BORGBACKUP_*, to avoid confusion.

@jsmeix
Copy link
Member

jsmeix commented Oct 24, 2016

I also think it is better to keep separated things separated.

In particular keeping different backup methods separated
is even more future proof, cf. "Multiple Backup Methods" in
#769
"Multiple Backup Methods" require separated config
variables for each backup method.

@jsmeix
Copy link
Member

jsmeix commented Oct 25, 2016

@gozora
please tell me when this pull request
is complete to be merged.

@gozora
Copy link
Member Author

gozora commented Oct 25, 2016

@jsmeix sorry for my trashy development management!
You can merge this one.
(In next days I'll create one more, but that will be just introduction of couple of Borg variables)

@jsmeix jsmeix merged commit 3bdc6b5 into rear:master Oct 25, 2016
@gozora gozora deleted the borg_work branch October 25, 2016 08:49
@jsmeix jsmeix mentioned this pull request Nov 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adaptions and new features fixed / solved / done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants