Compare commits
7 Commits
56bfaf7a8f
...
next
| Author | SHA1 | Date | |
|---|---|---|---|
| e406209d35 | |||
| ef0784262c | |||
| 0e43525a97 | |||
| 62a9698427 | |||
| b8e9d4bbf1 | |||
| 8bafb04735 | |||
| 5949555747 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +0,0 @@
|
|||||||
*.html
|
|
||||||
*.bak
|
|
||||||
*~
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# dsnap-sync
|
# dsnap-sync
|
||||||
# https://github.com/rzerres/dsnap-sync
|
# https://github.com/rzerres/dsnap-sync
|
||||||
# Copyright (C) 2016, 2017 James W. Barnett
|
# Copyright (C) 2016, 2017 James W. Barnett
|
||||||
# Copyright (C) 2017 - 2021 Ralf Zerres
|
# Copyright (C) 2017 - 2019 Ralf Zerres
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
8
PKGBUILD
8
PKGBUILD
@@ -1,8 +1,8 @@
|
|||||||
# Maintainer: Ralf Zerres <ralf.zerres at mail dot de>
|
# Maintainer: Ralf Zerres <ralf.zerres.de at gmail dot com>
|
||||||
pkgname=dsnap-sync
|
pkgname=dsnap-sync
|
||||||
pkgver=0.6.8
|
pkgver=0.6.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="BTRFS centric backups tool supporting snapper history for snapshot backups"
|
pkgdesc="Use snapper snapshots to backup to external drive"
|
||||||
arch=(any)
|
arch=(any)
|
||||||
url="https://github.com/rzerres/dsnap-sync"
|
url="https://github.com/rzerres/dsnap-sync"
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
@@ -11,7 +11,7 @@ optdepends=('attr' 'ionice' 'jq: for "MediaPool" functionality' 'libnotify' 'ltf
|
|||||||
source=(${url}/releases/download/$pkgver/$pkgname-$pkgver.tar.gz{,.sig})
|
source=(${url}/releases/download/$pkgver/$pkgname-$pkgver.tar.gz{,.sig})
|
||||||
#validpgpkeys=('8535CEF3F3C38EE69555BF67E4B5E45AA3B8C5C3')
|
#validpgpkeys=('8535CEF3F3C38EE69555BF67E4B5E45AA3B8C5C3')
|
||||||
sha512sums=('SKIP')
|
sha512sums=('SKIP')
|
||||||
'SKIP')
|
'SKIP')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd $pkgname
|
cd $pkgname
|
||||||
|
|||||||
54
README.md
54
README.md
@@ -1,5 +1,5 @@
|
|||||||
<!-- dsnap-sync README.md -->
|
<!-- dsnap-sync README.md -->
|
||||||
<!-- version: 0.6.6 -->
|
<!-- version: 0.5.9 -->
|
||||||
|
|
||||||
# dsnap-sync
|
# dsnap-sync
|
||||||
|
|
||||||
@@ -306,34 +306,6 @@ An open-source implementation can be found at
|
|||||||
|
|
||||||
## Restore
|
## Restore
|
||||||
|
|
||||||
### From Snapshot
|
|
||||||
|
|
||||||
When `dsnap-sync` did save the data using a native btrfs method
|
|
||||||
(`btrfs-snapshot` or `btrfs-clone`), data will be stored in a snapper compatible
|
|
||||||
directory structure on the target.
|
|
||||||
|
|
||||||
The structure may look like:
|
|
||||||
|
|
||||||
* └ backups
|
|
||||||
* └ @\<server-name\>
|
|
||||||
* └ \<subvol-name\>
|
|
||||||
* └ \<subvol-id\>
|
|
||||||
* ├ \.snapshot\>
|
|
||||||
* └ info.xml
|
|
||||||
|
|
||||||
To restore the data, you may either use `snapper` methods or copy back
|
|
||||||
the needed files using standard OS tools.
|
|
||||||
|
|
||||||
* using snapper
|
|
||||||
You may use `snapper diff <id1>..<id2> [files]` to compare the differences
|
|
||||||
between the given suvol-id's.
|
|
||||||
You may use `snapper rollback <id> ` to restore all data from the given \<id\>
|
|
||||||
|
|
||||||
* using OS tools
|
|
||||||
Use your favorit file-manager and change into the directory storing your
|
|
||||||
target backup subvol-id. The snapshots are stored in **read-only** mode.
|
|
||||||
Data are presented flat file and can be copied to any desired destination.
|
|
||||||
|
|
||||||
### From Tape
|
### From Tape
|
||||||
|
|
||||||
When `dsnap-sync` did save the data with method `btrfs-archive`, you will find
|
When `dsnap-sync` did save the data with method `btrfs-archive`, you will find
|
||||||
@@ -341,22 +313,22 @@ the corresponding data in a snapper compatible directory structure on the tape.
|
|||||||
|
|
||||||
The structure may look like:
|
The structure may look like:
|
||||||
|
|
||||||
* └ backups
|
└── backups
|
||||||
* └ @\<server-name\>
|
└── @<server-name>
|
||||||
* └ archive-\<subvol-name\>
|
├── archive-<subvol-name>
|
||||||
* └ \<subvol-id\>
|
│ └── <subvol-id>
|
||||||
* ├ \<subvol-id\>_full.btrfs
|
│ ├── <subvol-id>_full.btrfs
|
||||||
* └ info.xml
|
│ └── info.xml
|
||||||
|
|
||||||
The file `info.xml` provides the metadata corresponding to the snapshot.
|
The file `info.xml` provide the metadata corresponding to the snapshot.
|
||||||
The data of the snapshot is stored in the file `<subvol-id>_full.btrfs`.
|
The data of the snapshot is stored in the file `<subvol-id>_full.btrfs`.
|
||||||
This file has to be decrypted with btrfs tool `btrfs-send` to a btrfs
|
This file has to be decrypted with btrfs tool `btrfs-send` to a btrfs
|
||||||
restore directory:
|
restore directory:
|
||||||
|
|
||||||
cd /target_btrfs_path
|
cd /target_btrfs_path
|
||||||
cp /path_to_tape_root/backups/@<server-name>/archive-<subvol-name>/<subvol-id>_full.btrfs .
|
cp /path_to_tape_root/backups/@<server-name>/archive-<subvol-name>/<subvol-id>_full.btrfs .
|
||||||
cat <subvol-id>_full.btrfs | btrfs receive -v .
|
cat <subvol-id>_full.btrfs | btrfs receive -v .
|
||||||
rm <subvol-id>_full.btrfs
|
rm <subvol-id>_full.btrfs
|
||||||
|
|
||||||
Please consult btrfs-send man-page for further info.
|
Please consult btrfs-send man-page for further info.
|
||||||
|
|
||||||
@@ -387,4 +359,4 @@ This work is licensed under a [Creative Common License 4.0][License-CC_BY]
|
|||||||
![Creative Common Logo][Logo-CC_BY]
|
![Creative Common Logo][Logo-CC_BY]
|
||||||
|
|
||||||
© 2016, 2017 James W. Barnett;
|
© 2016, 2017 James W. Barnett;
|
||||||
© 2017 - 2021 Ralf Zerres
|
© 2017 - 2019 Ralf Zerres
|
||||||
|
|||||||
8
TODO.md
8
TODO.md
@@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
- dsnap-sync: restore btrfs-streams from archive backups
|
- dsnap-sync: restore btrfs-streams from archive backups
|
||||||
* find last full
|
* find last full
|
||||||
* iterate oval available incremental snapshots
|
* iterate oval available incrementals
|
||||||
- dsnap-sync: restore btrfs snapshot from snapshot backups
|
- dsnap-sync: restore btrfs snapshot from snapshot backups
|
||||||
* $ssh btrfs send `<snapshot_path>/<snapshot-id>/snapshot_ro` | btrfs receive `/<btrfs-restore-dir>/`
|
* $ssh btrfs send `<snapshot_path>/<snapshot-id>/snapshot_ro` | btrfs receive `/<btrfs-restore-dir>/`
|
||||||
(`recieved_uuid` attribte of `<btrfs-restore-dir>/snapshot_ro` will be imported from `<snapshot_path>/<snapshot-id>/snapshot_ro`)
|
(`recieved_uuid` attribte of `<btrfs-restore-dir>/snapshot_ro` will be imported from `<snapshot_path>/<snapshot-id>/snapshot_ro`)
|
||||||
* btrfs sub snap `<btrfs-restore-dir>/snapshot_ro` `<btrfs-restore-dir>/snapshot_rw`
|
* btrfs sub snap `<btrfs-restore-dir>/snapshot_ro` `<btrfs-restore-dir>/snapshot_rw`
|
||||||
(create a writable `snapshot_rw`; its attibute `received_uuid` isn't set anymore)
|
(create a writable `snapshot_rw`; its attibute `received_uuid` isn't set anymore)
|
||||||
* sub delete `<btrfs-restore-dir>/snapshot_ro`
|
* sub delete `<btrfs-restore-dir>/snapshot_ro`
|
||||||
now you are able to mount the snapshot for further processing
|
now you are able to mount the snapshot for further processing
|
||||||
- dsnap-sync: parallel tasks per config
|
- dsnap-sync: parallel tasks per config
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
- download Source code (zip-file | tar.gz file) to local dir
|
- download Source code (zip-file | tar.gz file) to local dir
|
||||||
- on local dir
|
- on local dir
|
||||||
* gpg --sign-with `<secret package-signing-key id>`
|
* gpg --sign-with `<secret package-signing-key id>`
|
||||||
--armor
|
--armor
|
||||||
--detach-sign dsnap-sync-`<tag>`.tar.gz
|
--detach-sign dsnap-sync-`<tag>`.tar.gz
|
||||||
- on github: create/edit release
|
- on github: create/edit release
|
||||||
* attach binaries by dropping them here or `selecting them`
|
* attach binaries by dropping them here or `selecting them`
|
||||||
|
|||||||
5396
bin/dsnap-sync
5396
bin/dsnap-sync
File diff suppressed because it is too large
Load Diff
37
debian/changelog
vendored
Normal file
37
debian/changelog
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
dsnap-sync (0.6.4) unstable; urgency=low
|
||||||
|
|
||||||
|
[Ralf Zerres]
|
||||||
|
* branch: master
|
||||||
|
|
||||||
|
-- Ralf Zerres <rzerres@networkx.de> Thu, 14 Mar 2019 09:20:02 +0100
|
||||||
|
|
||||||
|
dsnap-sync (0.6.0) unstable; urgency=low
|
||||||
|
|
||||||
|
[Ralf Zerres]
|
||||||
|
* branch: master
|
||||||
|
* multi-config: handling of multiple configurations as a group
|
||||||
|
* btrfs-archive: full and incremental stream files
|
||||||
|
* tape: handling of LTFS tapes
|
||||||
|
* ionice: optional use in target streams
|
||||||
|
|
||||||
|
-- Ralf Zerres <rzerres@networkx.de> Sat, 21 Sep 2018 20:00:00 +0200
|
||||||
|
|
||||||
|
dsnap-sync (0.5.9) unstable; urgency=low
|
||||||
|
|
||||||
|
[Ralf Zerres]
|
||||||
|
* branch: wip-d2d
|
||||||
|
* initial tape-admin wrapper
|
||||||
|
* automounter support for target devices
|
||||||
|
* bugfixes
|
||||||
|
* btrfs quota to read valid snapshot size / change size
|
||||||
|
* color handling in verbosity-levels
|
||||||
|
|
||||||
|
-- Ralf Zerres <rzerres@networkx.de> Sat, 25 Aug 2018 20:00:00 +0200
|
||||||
|
|
||||||
|
dsnap-sync (0.5.3) unstable; urgency=low
|
||||||
|
|
||||||
|
[Ralf Zerres]
|
||||||
|
* initial package
|
||||||
|
* adapt compilation to support ubuntu bionic
|
||||||
|
|
||||||
|
-- Ralf Zerres <rzerres@networkx.de> Fri, 1 Jun 2018 21:00:01 +0000
|
||||||
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
10
|
||||||
25
debian/control
vendored
Normal file
25
debian/control
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
Source: dsnap-sync
|
||||||
|
Section: admin
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Networkx GmbH <support@networkx.de>
|
||||||
|
Build-Depends: debhelper (>= 10), dh-exec
|
||||||
|
Uploaders: Ralf Zerres <ralf.zerres@networkx.de>
|
||||||
|
Standards-Version: 4.1.4.1
|
||||||
|
Homepage: https://github.com/rzerres/dsnap-sync.git
|
||||||
|
|
||||||
|
Package: dsnap-sync
|
||||||
|
Architecture: amd64
|
||||||
|
Conflicts: snap-sync
|
||||||
|
Depends: dash, snapper, btrfs-progs, systemd
|
||||||
|
Suggests: pv, libnotify-bin, mtx, jq, ltfs
|
||||||
|
Description: Backup and synchronize btrfs filesystems
|
||||||
|
dsnap-sync is designed to backup btrfs formated filesystems. It takes
|
||||||
|
advantage of the specific snapshots functionality btrfs offers and i
|
||||||
|
combines it with managemnet functionality of snapper.
|
||||||
|
.
|
||||||
|
dsnap-sync creates backups as btrfs-snapshots on a selectable target
|
||||||
|
device. Plug in and mount any btrfs-formatted device to your system.
|
||||||
|
Supported devices may be either local USB drives, but can be as well
|
||||||
|
remote accessible RAID drives. If possible the backup process will send
|
||||||
|
incremental snapshots to the target drive. If the snapshot will be
|
||||||
|
stored on a remote host, it is secured with ssh.
|
||||||
3
debian/dsnap-sync.install
vendored
Normal file
3
debian/dsnap-sync.install
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
bin/
|
||||||
|
etc/
|
||||||
|
usr/
|
||||||
22
debian/rules
vendored
Executable file
22
debian/rules
vendored
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
# debian/rules
|
||||||
|
# -*- mode: makefile; coding: utf-8 -*-
|
||||||
|
|
||||||
|
export DH_VERBOSE=1
|
||||||
|
#export DESTROOT=$(CURDIR)/debian/dsnap-sync
|
||||||
|
export DESTDIR=$(CURDIR)/debian/dsnap-sync
|
||||||
|
|
||||||
|
%:
|
||||||
|
# dh $@ --sourcedirectory=src
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
#override_dh_auto_configure:
|
||||||
|
# dh_auto_configure --sourcedirectory=src -- --prefix=/usr
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
dh_auto_install -- prefix=/usr
|
||||||
|
|
||||||
|
#override_dh_install:
|
||||||
|
# dh_install
|
||||||
|
# dh_missing --fail-missing
|
||||||
|
|
||||||
0
find_snapper_config
Executable file → Normal file
0
find_snapper_config
Executable file → Normal file
@@ -1,5 +1,5 @@
|
|||||||
<!-- dsnap-sync README.md -->
|
<!-- dsnap-sync README.md -->
|
||||||
<!-- version: 0.6.6 -->
|
<!-- version: 0.5.9 -->
|
||||||
|
|
||||||
# dsnap-sync
|
# dsnap-sync
|
||||||
|
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
<span>English</span> |
|
<span>English</span> |
|
||||||
<a href="../..">Englisch</a>
|
<a href="../..">Englisch</a>
|
||||||
<!-- a href="../spanish">Spanisch</a> | -->
|
<!-- a href="../spanish">Spanisch</a> | -->
|
||||||
|
<a href="lang/german">Deutsch</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Über
|
## Über
|
||||||
@@ -332,66 +333,6 @@ dann mit den gewohnten Betriebssystem Tools. Eine Open-Source Implementierung
|
|||||||
finden Sie z.B. unter
|
finden Sie z.B. unter
|
||||||
[LinearTapeFileSystem](https://github.com/LinearTapeFileSystem/ltfs).
|
[LinearTapeFileSystem](https://github.com/LinearTapeFileSystem/ltfs).
|
||||||
|
|
||||||
## Rücksicherung (restore)
|
|
||||||
|
|
||||||
### Dateisystem (target)
|
|
||||||
|
|
||||||
Wurden Daten mit einer nativen btrfs Methode (`btrfs-snapshot`,
|
|
||||||
`btrfs-clone`) gesichert, befinden sie sich in einer `snapper` kompatiblen
|
|
||||||
Verzeichnisstruktur auf dem gewählten Target.
|
|
||||||
|
|
||||||
Diese Struktur könnte so aussehen:
|
|
||||||
|
|
||||||
* └ backups
|
|
||||||
* └ @\<server-name\>
|
|
||||||
* └ \<subvol-name\>
|
|
||||||
* └ \<subvol-id\>
|
|
||||||
* ├ \.snapshot\>
|
|
||||||
* └ info.xml
|
|
||||||
|
|
||||||
Um Daten zurückzusichern, können Sie entweder native `snapper` Methoden verwenden,
|
|
||||||
oder auf Betriebssystem Programme zurückgreifen.
|
|
||||||
|
|
||||||
* native snapper Methoden
|
|
||||||
|
|
||||||
Verwenden Sie `snapper diff <id1>..<id2> [Dateien]`, um Unterschiede in den
|
|
||||||
gewählten subvol-id's aufzuzeigen.
|
|
||||||
Verwenden Sie `snapper rollback <id>`, um alle Daten der Sicherung (\<subvol-id\>)
|
|
||||||
an den Ursprungsort zurückzusichern.
|
|
||||||
|
|
||||||
* Betriebssystem Programme
|
|
||||||
|
|
||||||
Verwenden Sie Ihren bevorzugten Datei-Manager und wechseln Sie in das
|
|
||||||
Verzeichnis, in dem sich die Daten des gewünschten Backups (\<subvol-id\>)
|
|
||||||
befinden. Die Daten wurden als **read-only** Snapshot gesichert.
|
|
||||||
Sie können von hier aus in jedes gewünsche Zielverzeichnis kopiert werden.
|
|
||||||
|
|
||||||
### Band-Sicherung (tape)
|
|
||||||
|
|
||||||
Wurden Daten mit der Methode `btrfs-archive` gesichert, speichert `dsnap-sync`
|
|
||||||
diese in einer `snapper` kompatiblen Datei-Struktur auf dem Band.
|
|
||||||
|
|
||||||
Dies Struktur könnte so aussehen:
|
|
||||||
|
|
||||||
* └ backups
|
|
||||||
* └ @\<server-name\>
|
|
||||||
* └ archive-\<subvol-name\>
|
|
||||||
* └ \<subvol-id\>
|
|
||||||
* ├ \<subvol-id\>_full.btrfs
|
|
||||||
* └ info.xml
|
|
||||||
|
|
||||||
In der Datei `info.xml` werden die Metadaten zum Snapshot gespeichert.
|
|
||||||
Die Bewegungsdaten des snapshots befinden sich in der Datei `\<subvol-id\>_full.btrfs`.
|
|
||||||
Diese Datei muss mit dem btrfs programm `btrfs-send` auf ein btrfs Verzeichnis zurück
|
|
||||||
geschrieben werden:
|
|
||||||
|
|
||||||
cd /target_btrfs_path
|
|
||||||
cp /path_to_tape_root/backups/@<server-name>/archive-<subvol-name>/<subvol-id>_full.btrfs .
|
|
||||||
cat <subvol-id>_full.btrfs | btrfs receive -v .
|
|
||||||
rm <subvol-id>_full.btrfs
|
|
||||||
|
|
||||||
Die man-page zu `btrfs-send` enthält weiterführende Informationen.
|
|
||||||
|
|
||||||
## Mitarbeit
|
## Mitarbeit
|
||||||
|
|
||||||
Hilfe ist sehr willkommen! Gerne könnt Ihr das Projekt forken und PR's einreichen,
|
Hilfe ist sehr willkommen! Gerne könnt Ihr das Projekt forken und PR's einreichen,
|
||||||
@@ -423,4 +364,4 @@ Diese Arbeit ist unter der [Creative Common License 4.0][License-CC_BY] lizensie
|
|||||||
![Creative Common Logo][Logo-CC_BY]
|
![Creative Common Logo][Logo-CC_BY]
|
||||||
|
|
||||||
© 2016, 2017 James W. Barnett;
|
© 2016, 2017 James W. Barnett;
|
||||||
© 2017 - 2021 Ralf Zerres
|
© 2017 - 2019 Ralf Zerres
|
||||||
|
|||||||
Reference in New Issue
Block a user