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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aurélien
backupninja
Commits
3f2a8266
Commit
3f2a8266
authored
Nov 24, 2007
by
micah
Browse files
Options
Downloads
Patches
Plain Diff
fixed Trac #1, actually add example.rsync
parent
19dbc0aa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
ChangeLog
+4
-2
4 additions, 2 deletions
ChangeLog
examples/example.rsync
+124
-0
124 additions, 0 deletions
examples/example.rsync
examples/example.sys
+2
-0
2 additions, 0 deletions
examples/example.sys
handlers/sys.in
+12
-6
12 additions, 6 deletions
handlers/sys.in
with
142 additions
and
8 deletions
ChangeLog
+
4
−
2
View file @
3f2a8266
...
@@ -10,8 +10,8 @@ version 0.9.5 -- unreleased
...
@@ -10,8 +10,8 @@ version 0.9.5 -- unreleased
applied to fix #370396 broke this, especially for configuration files
applied to fix #370396 broke this, especially for configuration files
created with permissions 000 by an older ninjahelper version.
created with permissions 000 by an older ninjahelper version.
. Enhanced portability for other platforms
. Enhanced portability for other platforms
.
Fixed Trac#11 (quoting
needed to prevent shell expansion, brok
e
the
.
Added quoting because it was
needed to prevent shell expansion, brok
ing
the
toint function sometimes)
toint function sometimes
(Trac#11
)
. Fixed reportspace option (Trac#10)
. Fixed reportspace option (Trac#10)
handler changes
handler changes
dup:
dup:
...
@@ -61,6 +61,8 @@ version 0.9.5 -- unreleased
...
@@ -61,6 +61,8 @@ version 0.9.5 -- unreleased
. Fixed example in example.sys to detail the __star__ in partitionsfile and
. Fixed example in example.sys to detail the __star__ in partitionsfile and
note why its necessary (Closes: #409192)
note why its necessary (Closes: #409192)
. Force C locale for sfdisk to ensure english words are found in grep
. Force C locale for sfdisk to ensure english words are found in grep
. Make directory where output is placed configurable, and create the parent dir
if it doesn't exist (Closes: Trac#1)
fixed 'make install' bug that failed if /etc/backup.d already existed
fixed 'make install' bug that failed if /etc/backup.d already existed
changed spaces to tabs in Makefile.am
changed spaces to tabs in Makefile.am
...
...
This diff is collapsed.
Click to expand it.
examples/example.rsync
0 → 100644
+
124
−
0
View file @
3f2a8266
#
# rsync handler example file
#
# Mandatory options are uncommented with sugested values
# Other options are commented out with their default values
#
# Note: You dont need to manually specify vservers using "include = /vservers".
# They're automatically backuped if vserver is set to "yes" on you backupninja.conf.
[general]
# rsync log file
#log = /var/log/backup/rsync.log
# partition device where the backup lives
# just use this option if your data is backed up in a separate partition and
# you want backupninja to fsck it; this option will just be used if fscheck
# (see below) is set to 'yes'
#partition =
# backup partition mountpoint or backup main folder
# this doesn't need to be a real partition, but should be at least the
# main folder where the backup is being stored
mountpoint = /mnt/backup
# folder relative do mountpoint where the backup should be stored
backupdir = myserver
# number of backup increments (min = 5)
days = 7
# set to 1 if fsck should run on partition after the backup is made
#fscheck =
# set to 1 if $partition is mounted read-only
#read_only =
# use this if you need a lockfile to be kept during backup execution
# this is an useful feature in case you have some tasks that should
# know if the backup is running or not
#lockfile =
# rsync command nice level
#nicelevel = 0
# set to "yes" if your system isnt handling timestamps correctly
#enable_mv_timestamp_bug = no
# temp folder
#tmp = /tmp
[source]
# where the data to be backed up is (local or remote)
#from = local
# when "yes", test the connection for a remote source before backup
#testconnect = no
# include folder on backup
include = /etc
include = /var
# exclude folder on backup
exclude = exclude_folder1
exclude = exclude_folder2
# exlude some vserver from backup
# this is used only if vservers = yes on backupninja.conf
exclude_vserver = excluded_vserver1
exclude_vserver = excluded_vserver2
# ssh command line (remote only)
#ssh = ssh
# rsync program
# it defaults to $RSYNC value from backupninja.conf
#rsync = $RSYNC
# rsync command options
#rsync_options = "-av --delete"
# when set to 1, use numeric ids instead of user/group mappings on rsync
#numericids = 0
# if set to 1, compress data on rsync (remote source only)
#compress = 0
# set a badnwidth limit in kbps (remote source only)
#bandwidthlimit =
# remote rsync program (remote source only)
#remote_rsync = rsync
# This section is used to stop and start services that should be turned of
# during the backup procedure.
#
#[services]
#
# absolute path where scripts are located
#initscripts =
#
# script name to be stoped at the begining of the backup and started at its end
#service =
# You can also specify some system comands if you don't want the default system values
# by enabling the section below.
#
#[system]
#
# rm command
#rm = rm
#
# cp command
#cp = cp
#
# touch command
#touch = touch
#
# mv command
#mv = mv
#
# fsck command
#fsck = fsck
This diff is collapsed.
Click to expand it.
examples/example.sys
+
2
−
0
View file @
3f2a8266
...
@@ -21,6 +21,8 @@
...
@@ -21,6 +21,8 @@
# here are the defaults, commented out:
# here are the defaults, commented out:
# The output from the sys handler will be placed in $parentdir
# parentdir = /var/backups
# packages = yes
# packages = yes
# packagesfile = /var/backups/dpkg-selections.txt
# packagesfile = /var/backups/dpkg-selections.txt
...
...
This diff is collapsed.
Click to expand it.
handlers/sys.in
+
12
−
6
View file @
3f2a8266
...
@@ -32,35 +32,41 @@ else
...
@@ -32,35 +32,41 @@ else
warning
"Unknown OS detected!"
warning
"Unknown OS detected!"
fi
fi
getconf parentdir /var/backups
getconf packages
yes
getconf packages
yes
getconf dosfdisk
yes
getconf dosfdisk
yes
getconf dohwinfo
yes
getconf dohwinfo
yes
if
[
!
-d
$parentdir
]
;
then
mkdir
-p
$parentdir
fi
if
[
$os
=
"debian"
]
if
[
$os
=
"debian"
]
then
then
getconf packagesfile
/var/backups
/dpkg-selections.txt
getconf packagesfile
$parentdir
/dpkg-selections.txt
getconf packagemgr
`
which dpkg
`
getconf packagemgr
`
which dpkg
`
getconf packagemgroptions
' --get-selections *'
getconf packagemgroptions
' --get-selections *'
elif
[
$os
=
"redhat"
]
elif
[
$os
=
"redhat"
]
then
then
getconf packagesfile
/var/backups
/rpmpackages.txt
getconf packagesfile
$parentdir
/rpmpackages.txt
getconf packagemgr
`
which rpm
`
getconf packagemgr
`
which rpm
`
getconf packagemgroptions
' -qa '
getconf packagemgroptions
' -qa '
getconf SYSREPORT
`
which sysreport
`
getconf SYSREPORT
`
which sysreport
`
getconf sysreport_options
' -norpm '
getconf sysreport_options
' -norpm '
else
else
getconf packagesfile
/var/backups
/unknownOS.txt
getconf packagesfile
$parentdir
/unknownOS.txt
fi
fi
packagemgroptions
=
"
${
packagemgroptions
//__star__/*
}
"
packagemgroptions
=
"
${
packagemgroptions
//__star__/*
}
"
getconf partitions
yes
getconf partitions
yes
getconf partitionsfile
/var/backups
/partitions.__star__.txt
getconf partitionsfile
$parentdir
/partitions.__star__.txt
getconf hardware
yes
getconf hardware
yes
getconf hardwarefile
/var/backups
/hardware.txt
getconf hardwarefile
$parentdir
/hardware.txt
getconf sysreport
yes
getconf sysreport
yes
getconf sysreportfile
/var/backups
/sysreport.txt
getconf sysreportfile
$parentdir
/sysreport.txt
getconf SFDISK
`
which sfdisk
`
getconf SFDISK
`
which sfdisk
`
getconf HWINFO
`
which hwinfo
`
getconf HWINFO
`
which hwinfo
`
...
...
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