Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Liberate
backupninja
Commits
1d3e3482
Commit
1d3e3482
authored
Jul 8, 2005
by
micah
Browse files
Options
Downloads
Patches
Plain Diff
Added stefani's makecd handler
parent
aef16739
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
changelog
+1
-0
1 addition, 0 deletions
changelog
etc/backup.d/example.makecd
+31
-0
31 additions, 0 deletions
etc/backup.d/example.makecd
handlers/makecd
+86
-0
86 additions, 0 deletions
handlers/makecd
with
118 additions
and
0 deletions
changelog
+
1
−
0
View file @
1d3e3482
...
...
@@ -2,6 +2,7 @@ version 0.7 -- July 3 2005
added ninjahelper: a dialog based wizard for creating backupninja configs.
considerably improved and changed the log file output.
you can now disable actions with .disabled (this is new preferred method).
added makecd handler and example.makecd for backing up to cd/dvd
version 0.6 -- June 16 2005
ldap handler has new options: backup method to use (ldapsearch or
...
...
This diff is collapsed.
Click to expand it.
etc/backup.d/example.makecd
0 → 100644
+
31
−
0
View file @
1d3e3482
# TYP is cd or dvd AS WELL AS the disk inside!!
burnertype = cd
# system (yes) or directory/files (no)
# this function not yet implemented
#system = yes
# location for image file
backupdir = /var/backups/makecd
# image filename
imagefile = example.iso
# iso or burn to cd/dvd?
isoonly = no
# cd/dvd burner device
device=/dev/hdc
# base directory to include in the backup
target = /
# files or directories to be excluded
exclude = /proc
exclude = /lost+found
exclude = /tmp
# backupninja will perfrom this at gvien date/time
when = wednesday at 02:00
This diff is collapsed.
Click to expand it.
handlers/makecd
0 → 100644
+
86
−
0
View file @
1d3e3482
#
# burncd handler script for backupninja
#
getconf backupdir /var/backups/makecd
getconf exclude
getconf target
getconf burnertype cd
getconf system no
getconf isoonly yes
getconf imagefile backup.iso
getconf device
# define needed executables:
MKISOFS="/usr/bin/mkisofs"
GROWISOFS="/usr/bin/growisofs"
#CDRECORD="/usr/bin/cdrecord"
CDRECORD="/usr/bin/cdrecord.mmap"
CDRDAO="/usr/bin/cdrdao"
DVDINFO="/usr/bin/dvd+rw-mediainfo"
# create backup dirs and check existence of progs.
[ -d $backupdir ] || mkdir -p $backupdir
[ -d $backupdir ] || fatal "Backup directory '$backupdir'"
[ -e "$target" ] || fatal "target does not exist "
[ -x "$MKISOFS" ] || debug 3 "echo executable mkisofs not present"
[ -x "$GROWISOFS" ] || debug 3 "echo executable growisofs not present"
[ -x "$CDRECORD" ] || debug 3 "echo executable cdrecord not present"
[ -x "$CDRDAO" ] || debug 3 "echo executable cdrdao not present"
if [ "$isoonly" == "no" ]; then
[ -e $device ] || fatal "No Burner device available"
fi
outputfile="$backupdir/$imagefile"
execstr="$MKISOFS --quiet -R -o $outputfile "
str=""
# excludes
for i in $exclude; do
str=" -x ${i}$str"
done
debug 0 "echo $str "
execstr="${execstr} $str $target "
debug 0 "echo $execstr "
output=` $execstr 2>&1 `
code=$?
if [ "$code" == "0" ]; then
debug $output
info "Successfully finished creation of iso"
else
warning $output
warning "Failed to create iso"
fi
if [ "$isoonly" == "no" ]; then
if [ "$burnertype" == "cd" ]; then
# burning iso to CD
$CDRECORD -v gracetime=2 dev=$device speed=8 -dao -data $outputfile
code=$?
if [ "$code" == "0" ]; then
debug $output
info "Successfully burned CD"
else
warning $output
warning "Failed to create CD"
fi
fi
if [ "$burnertype" == "dvd" ]; then
# burning iso dvd
$GROWISOFS -speed=2 -Z $device=$outputfile -use-the-force-luke=notray -use-the-force-luke=tty
code=$?
if [ "$code" == "0" ]; then
debug $output
info "Successfully burned DVD"
else
warning $output
warning "Failed to create DVD"
fi
fi
fi
return 0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment