Skip to content

Commit

Permalink
add duply to SL repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad V. Teterya committed May 4, 2011
1 parent dff00a9 commit 1f4dec3
Show file tree
Hide file tree
Showing 3 changed files with 294 additions and 0 deletions.
3 changes: 3 additions & 0 deletions duply/Makefile
@@ -0,0 +1,3 @@
SRCDIR := $(shell pwd)
NAME := $(shell basename $(SRCDIR))
include ../common/Makefile
232 changes: 232 additions & 0 deletions duply/duply.1
@@ -0,0 +1,232 @@
." Text automatically generated by txt2man
.TH DUPLY 1 "04 May 2011" "duply-1.5.5" "User Manuals"
.SH VERSION
duply version 1.5.5
(http://duply.net)
.SH DESCRIPTION
Duply deals as a wrapper for the mighty duplicity magic.
It simplifies running duplicity with cron or on command line by:
.RS
.IP \(bu 3
keeping recurring settings in profiles per backup job
.IP \(bu 3
enabling batch operations eg. backup_verify_purge
.IP \(bu 3
executing pre/post scripts for every command
.IP \(bu 3
precondition checking for flawless duplicity operation
.RE
.PP
For each backup job one configuration profile must be created.
The profile folder will be stored under '~/.duply/<profile>'
(where ~ is the current users home directory).
.TP
.B
Hint:
If the folder '/etc/duply' exists, the profiles for the super
user root will be searched & created there.
.SH USAGE
.TP
.B
first time usage (profile creation):
duply <profile> create
.TP
.B
general usage in single or batch mode (see EXAMPLES):
duply <profile> <command>[_<command>_\.\.\.] [<options> ...]
.PP
Non duply options are passed on to duplicity (see OPTIONS).
All conf parameters can also be defined in the environment instead.
.SH PROFILE
Indicated by a profile name (<profile>), which is resolved
to '~/.duply/<profile>' (~ expands to environment variable $HOME).
.PP
Superuser root can place profiles under '/etc/duply' if the
folder is manually created before running duply.
.TP
.B
Hint:
If '/etc/duply' is created later, already existing profiles in the
user dir have to be moved manually or will cease to work.
.TP
.B
example 1:
duply humbug backup
.PP
Alternatively a _path_ might be used e.g. useful for quick testing,
restoring or exotic locations. Shell expansion should work as usual.
.TP
.B
Hint:
The path must contain at least one path separator '/',
e.g. './test' instead of only 'test'.
.TP
.B
example 2:
duply ~/.duply/humbug backup
.SH COMMANDS
.TP
.B
usage
get usage help text
.TP
.B
create
creates a configuration profile
.TP
.B
backup
backup with pre/post script execution (batch: pre_bkp_post),
full (if full_if_older matches or no earlier backup is found)
incremental (in all other cases)
.TP
.B
pre/post
execute '<profile>/pre', '<profile>/post' scripts
.TP
.B
bkp
as above but without executing pre/post scripts
.TP
.B
full
force full backup
.TP
.B
incr
force incremental backup
.TP
.B
list [<age>]
list all files in backup (as it was at <age>, default: now)
.TP
.B
status
prints backup sets and chains currently in repository
.TP
.B
verify
list files changed since latest backup
.TP
.B
purge [\fB--force\fP]
shows outdated backup archives (older than $MAX_AGE)
[actually delete these files]
.TP
.B
purge-full [\fB--force\fP]
shows outdated backups (more than $MAX_FULL_BACKUPS,
the number of 'recent' full backups and associated
incrementals to keep) [actually delete these files]
.TP
.B
cleanup [\fB--force\fP]
shows broken backup archives (e.g. after unfinished run)
[actually delete these files]
.TP
.B
restore <target_path> [<age>]
restore the backup to <target_path> [as it was at <age>]
.TP
.B
fetch <src_path> <target_path> [<age>]
restore single file/folder from backup [as it was at <age>]
.TP
.B
changelog
print changelog / todo list
.TP
.B
txt2man
feature for package admins, create a manpage based the usage
output. download txt2man from http://mvertes.free.fr/, put it
in the path and run 'duply txt2man' to create a man page.
.SH OPTIONS
.TP
.B
\fB--force\fP
passed to duplicity (see commands: purge, purge-full, cleanup)
.TP
.B
\fB--preview\fP
do nothing but print out generated duplicity command lines
.TP
.B
\fB--disable-encryption\fP
disable encryption, overrides profile settings
.SH PRE POST SCRIPTS
All internal duply variables will be readable in the scripts.
Some of interest might be
.PP
.nf
.fam C
CONFDIR, SOURCE, TARGET_URL_<PROT|HOSTPATH|USER|PASS>,
GPG_<KEYS_ENC|KEY_SIGN|PW>, CMD_<PREV|NEXT>

.fam T
.fi
The CMD_* variables were introduced to allow different actions according to
the command the scripts were attached to e.g. 'pre_bkp_post_pre_verify_post'
will call the pre script two times, with CMD_NEXT variable set to 'bkp'
on the first and to 'verify' on the second run.
.SH EXAMPLES
.TP
.B
create profile 'humbug':
duply humbug create (now edit the resulting conf file)
.TP
.B
backup 'humbug' now:
duply humbug backup
.TP
.B
list available backup sets of profile 'humbug':
duply humbug status
.TP
.B
list and delete obsolete backup archives of 'humbug':
duply humbug purge \fB--force\fP
.TP
.B
restore latest backup of 'humbug' to /mnt/restore:
duply humbug restore /mnt/restore
.TP
.B
restore /etc/passwd of 'humbug' from 4 days ago to /root/pw:
duply humbug fetch etc/passwd /root/pw 4D
(see "duplicity manpage", section TIME FORMATS)
.TP
.B
a one line batch job on 'humbug' for cron execution:
duply humbug backup_verify_purge \fB--force\fP
.SH FILES
in profile folder '~/.duply/<profile>' or '/etc/duply'
.TP
.B
conf
profile configuration file
.TP
.B
pre,post
pre/post scripts (see above for details)
.TP
.B
gpgkey.*.asc
exported GPG key files
.TP
.B
exclude
a globbing list of included or excluded files/folders
(see "duplicity manpage", section FILE SELECTION)
.SH IMPORTANT
Copy the _whole_ profile folder after the first backup to a safe place.
It contains everything needed to restore your backups. You will need
it if you have to restore the backup from another system (e.g. after a
system crash). Keep access to these files restricted as they contain
_all_ informations (gpg data, ftp data) to access and modify your backups.
.PP
Repeat this step after _all_ configuration changes. Some configuration
options are crucial for restoration.
.SH SEE ALSO
duplicity man page:
\fBduplicity\fP(1) or http://duplicity.nongnu.org/duplicity.1.html
59 changes: 59 additions & 0 deletions duply/duply.spec
@@ -0,0 +1,59 @@
Name: duply
Version: 1.5.5
Release: 1%{?dist}
Summary: Wrapper for duplicity
Group: Applications/Archiving
License: GPLv2
URL: http://duply.net/
Source0: http://downloads.sourceforge.net/ftplicity/%{name}_%{version}.tgz
Source1: %{name}.1
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: duplicity


%description
duply deals as a wrapper for the mighty duplicity magic. It simplifies
running duplicity with cron or on command line by:

- keeping recurring settings in profiles per backup job
- enabling batch operations e.g. backup_verify_purge
- executing pre/post scripts
- precondition checking for flawless duplicity operation

Since version 1.5.0 all duplicity backends are supported. Hence the
name changed from ftplicity to duply.


%prep
%setup -q -n %{name}_%{version}
iconv -f iso-8859-1 -t utf-8 %{name} > %{name}.tmp
mv %{name}{.tmp,}


%build


%install
rm -rf %{buildroot}
install -p -D -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -d -m 0700 %{buildroot}%{_sysconfdir}/%{name}
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/%{name}.1
gzip -9 %{buildroot}%{_mandir}/man1/%{name}.1


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc gpl-2.0.txt
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*
%dir %{_sysconfdir}/%{name}


%changelog
* Wed May 4 2011 Vlad V. Teterya <vlad@server-labs.ua> - 1.5.5-1
- Initial build

0 comments on commit 1f4dec3

Please sign in to comment.