-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2006-12-29 Alexis Sukrieh <sukria@backup-manager.org>
* lib/sanitize.sh + Make sure BM_ENCRYPTION_RECIPIENT is defined when BM_ENCRYPTION_METHOD is set to gpg. * lib/backup-methods.sh + Handle gently encryption when building meta commands. (closes: #135) + The code of the gzip and the bzip2 compressors have been merged. Less code, less bugs Luke. git-svn-id: svn://svn.backup-manager.org/backup-manager/trunk@526 2e458433-d701-0410-9826-f9b593394a3c
- Loading branch information
sukria
committed
Dec 28, 2006
1 parent
8aebc12
commit 8fb9045
Showing
5 changed files
with
118 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
source testlib.sh | ||
verbose="true" | ||
warnings="true" | ||
|
||
source confs/base.conf | ||
|
||
# taken verbatim from file attached to bug #4 | ||
# http://bugzilla.backup-manager.org/cgi-bin/attachment.cgi?id=1&action=view | ||
export BM_REPOSITORY_ROOT="$PWD/repository" | ||
export BM_ARCHIVE_METHOD="pipe" | ||
export BM_ENCRYPTION_METHOD="gpg" | ||
export BM_ENCRYPTION_RECIPIENT="0x1EE5DD34" | ||
|
||
source $locallib/sanitize.sh | ||
bm_init_env | ||
bm_init_today | ||
|
||
BM_PIPE_COMMAND[0]="cat /etc/passwd" | ||
BM_PIPE_NAME[0]="passwd" | ||
BM_PIPE_FILETYPE[0]="txt" | ||
BM_PIPE_COMPRESS[0]="gzip" | ||
files[0]="$BM_REPOSITORY_ROOT/$BM_ARCHIVE_PREFIX-passwd.$TODAY.txt.gz.gpg" | ||
|
||
BM_PIPE_COMMAND[1]="echo 'sukria' ; date " | ||
BM_PIPE_NAME[1]="sukria" | ||
BM_PIPE_FILETYPE[1]="txt" | ||
BM_PIPE_COMPRESS[1]="bzip2" | ||
files[1]="$BM_REPOSITORY_ROOT/$BM_ARCHIVE_PREFIX-sukria.$TODAY.txt.bz2.gpg" | ||
|
||
BM_PIPE_COMMAND[2]="ls -lh /" | ||
BM_PIPE_NAME[2]="ls-root" | ||
BM_PIPE_FILETYPE[2]="txt" | ||
BM_PIPE_COMPRESS[2]="" | ||
files[2]="$BM_REPOSITORY_ROOT/$BM_ARCHIVE_PREFIX-ls-root.$TODAY.txt.gpg" | ||
|
||
# BM_PIPE_COMMAND[3]="/usr/bin/tototot" | ||
# BM_PIPE_NAME[3]="failure" | ||
# BM_PIPE_FILETYPE[3]="txt" | ||
# BM_PIPE_COMPRESS[3]="" | ||
|
||
# clean | ||
if [ -e $PWD/repository ]; then | ||
rm -rf $PWD/repository | ||
fi | ||
|
||
# BM actions | ||
create_directories | ||
make_archives | ||
|
||
# test of success/failure | ||
for file in $files | ||
do | ||
if [ ! -e $file ]; then | ||
warning "file $file does not exist" | ||
rm -rf $BM_ARCHIVE_ROOT | ||
exit 10 | ||
fi | ||
done | ||
rm -rf $BM_ARCHIVE_ROOT | ||
exit 0 |