Skip to content

Commit

Permalink
Merge pull request #982 from rear/dev
Browse files Browse the repository at this point in the history
synchronize dev and master branch
  • Loading branch information
gdha committed Aug 25, 2016
2 parents 847323f + 22d26a0 commit 7ae8e57
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#### **Did you write a patch that fixes a bug?**

* Open a new GitHub pull request with the patch.
* [Open a new GitHub pull request with the patch](http://relax-and-recover.org/development/).

* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.

Expand Down
12 changes: 11 additions & 1 deletion doc/rear.8.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= rear(8)
:version: v1.19.0
:date: 05 August 2016
:date: 23 August 2016
:data-uri:
:doctype: manpage
:lang: en
Expand Down Expand Up @@ -175,6 +175,12 @@ settings are:
OUTPUT_URL=*file://*::
Write the image to disk. The default is in _/var/lib/rear/output/_.

OUTPUT_URL=*nfs://*::
Write the image by mounting the target filesystem via NFS.

OUTPUT_URL=*cifs://*::
Write the image by mounting the target filesystem via CIFS.

OUTPUT_URL=*fish://*::
Write the image using +lftp+ and the FISH protocol.

Expand Down Expand Up @@ -206,6 +212,10 @@ OUTPUT_URL=*null*::
Do not copy the ISO image from _/var/lib/rear/output/_ to an external destination.
Useful in combination with an _external_ backup program, or when +BACKUP_URL=iso://backup+

If you do not specify +OUTPUT_URL+ variable then by default it will be aligned to what
was defined by variable +BACKUP_URL+. And, the ISO image will then be copied to the same
location as your backup of the system disk(s).

The +ISO_DEFAULT+ variable defines what default boot option is used on the rescue image.
Possible values are `manual`, `boothd` or `unattended`. Manual will make you boot into
the shell directly by default, boothd will boot to the first disk (default) or unattended
Expand Down
5 changes: 5 additions & 0 deletions usr/share/rear/backup/default/01_pre_backup_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if test "$PRE_BACKUP_SCRIPT" ; then
Log "Running PRE_BACKUP_SCRIPT '${PRE_BACKUP_SCRIPT[@]}'"
AddExitTask "${POST_BACKUP_SCRIPT[@]}"
eval "${PRE_BACKUP_SCRIPT[@]}"
fi
5 changes: 5 additions & 0 deletions usr/share/rear/backup/default/99_post_backup_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if test "$POST_BACKUP_SCRIPT" ; then
Log "Running POST_BACKUP_SCRIPT '${POST_BACKUP_SCRIPT[@]}'"
RemoveExitTask "${POST_BACKUP_SCRIPT[@]}"
eval "${POST_BACKUP_SCRIPT[@]}"
fi
16 changes: 15 additions & 1 deletion usr/share/rear/conf/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1118,13 +1118,27 @@ ELILO_BIN=
#
# NOTE: The scripts can be defined as an array to better handly spaces in parameters.
# The scripts are called like this: eval "${PRE_RECOVERY_SCRIPT[@]}"

# Call this after Rela-and-Recover did everything in the recover workflow.
# Use $TARGET_FS_ROOT (by default '/mnt/local') to refer to the recovered system.
POST_RECOVERY_SCRIPT=

# call this before Relax-and-Recover starts to do anything in the recover workflow. You have the rescue system but nothing else
# Call this before Relax-and-Recover starts to do anything in the recover workflow. You have the rescue system but nothing else
PRE_RECOVERY_SCRIPT=

# PRE/POST Backup scripts will provide the ability to run certain tasks before and after a ReaR backup.
# for example:
# If a small database running on local filesystem and dependant on a local service, you will maintain its data consistency.
# Stopping it before backup and restarting again after.
# In case of any error during backup, if POST tasks were defined, ReaR will run those POST tasks within ExitTasks Array.
# This will prevent that the database remain stopped.

# Call this after Relax-and-Recover finished to do anything in the mkbackup/mkbackuponly workflow.
POST_BACKUP_SCRIPT=

# Call this before Relax-and-Recover starts to do anything in the mkbackup/mkbackuponly workflow.
PRE_BACKUP_SCRIPT=

# some external backup software give you the opportunity to enter paths to exclude ...
# we tend to use a timer in seconds we wait before continuing (we do not want to break the automated restores)
WAIT_SECS=30
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# On Ubuntu we have received many reports of a missing /dev/disk/by-label/RELAXRECOVER link
# and therefore during recovery the cdrom was not found automatically - details are in #326

# check if the symbolic link exist? Yes - just return
[[ -h /dev/disk/by-label/RELAXRECOVER ]] && return

if [[ -h /dev/cdrom ]] ; then
ln -s /dev/cdrom /dev/disk/by-label/RELAXRECOVER
elif [[ -b /dev/sr0 ]] ; then
ln -s /dev/sr0 /dev/disk/by-label/RELAXRECOVER
else
echo "Did not find a cdrom device. Recover might fail."
fi

0 comments on commit 7ae8e57

Please sign in to comment.