dar-backup 0.5.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dar_backup-0.5.8/PKG-INFO +356 -0
- dar_backup-0.5.8/README.md +341 -0
- dar_backup-0.5.8/dar_backup/.darrc +108 -0
- dar_backup-0.5.8/dar_backup/cleanup.py +197 -0
- dar_backup-0.5.8/dar_backup/config_settings.py +65 -0
- dar_backup-0.5.8/dar_backup/dar_backup.py +671 -0
- dar_backup-0.5.8/dar_backup/util.py +213 -0
- dar_backup-0.5.8/dar_backup.egg-info/PKG-INFO +356 -0
- dar_backup-0.5.8/dar_backup.egg-info/SOURCES.txt +18 -0
- dar_backup-0.5.8/dar_backup.egg-info/dependency_links.txt +1 -0
- dar_backup-0.5.8/dar_backup.egg-info/entry_points.txt +3 -0
- dar_backup-0.5.8/dar_backup.egg-info/top_level.txt +1 -0
- dar_backup-0.5.8/setup.cfg +13 -0
- dar_backup-0.5.8/setup.py +34 -0
- dar_backup-0.5.8/test/test_bitrot.py +234 -0
- dar_backup-0.5.8/test/test_cleanup.py +196 -0
- dar_backup-0.5.8/test/test_create_full_diff_incr_backup.py +151 -0
- dar_backup-0.5.8/test/test_listing.py +89 -0
- dar_backup-0.5.8/test/test_space_definition.py +118 -0
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: dar-backup
|
|
3
|
+
Version: 0.5.8
|
|
4
|
+
Summary: A script to do full, differential and incremental backups using `dar`. Some files are restored from the backups during verification, after which par2 redundancy files are created. The script also has a cleanup feature to remove old backups and par2 files.
|
|
5
|
+
Home-page: https://github.com/per2jensen/dar-backup
|
|
6
|
+
Author: Per Jensen
|
|
7
|
+
Author-email: per2jensen@gmail.com
|
|
8
|
+
License: General Public License version 3 or later
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: System Administrators
|
|
11
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Topic :: System :: Archiving :: Backup
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# <a id="full-diff-inc"> Full, differential or incremental backups using 'dar'
|
|
17
|
+
|
|
18
|
+
The wonderful 'dar' [Disk Archiver] (https://github.com/Edrusb/DAR) is used for
|
|
19
|
+
the heavy lifting, together with the par2 suite in these scripts.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# <a id="my-use-case"> My use case
|
|
23
|
+
|
|
24
|
+
I have cloud storage mounted on a directory within my home dir. The filesystem is [FUSE based](https://www.kernel.org/doc/html/latest/filesystems/fuse.html), which gives it a few special features
|
|
25
|
+
- a non-privileged user (me :-)) can perform a mount
|
|
26
|
+
- a privileged user cannot look into the filesystem --> a backup script running as root is not suitable
|
|
27
|
+
|
|
28
|
+
I needed the following:
|
|
29
|
+
- Backup my cloud storage to something local (cloud is convenient, but I want control over my backups)
|
|
30
|
+
- Backup primarily photos, video and different types of documents
|
|
31
|
+
- Have a simple non-complicated way of restoring, possibly years into the future. 'dar' fits that scenario with a single statically linked binary (kept with the archives). There is no need install/configure anything - restoring is simple and works well.
|
|
32
|
+
- During backup archives must be tested and a restore test (however small) performed
|
|
33
|
+
- Archives stored on a server with a reliable file system (easy to mount a directory over sshfs)
|
|
34
|
+
- Easy to verify archive's integrity, after being moved around.
|
|
35
|
+
|
|
36
|
+
I do not need the encryption features of dar, as all storage is already encrypted.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# <a id="license"> License
|
|
40
|
+
|
|
41
|
+
These scripts are licensed under the GPLv3 license.
|
|
42
|
+
Read more here: https://www.gnu.org/licenses/gpl-3.0.en.html, or have a look at the ["LICENSE"](https://github.com/per2jensen/dar-backup/blob/main/LICENSE) file in this repository.
|
|
43
|
+
|
|
44
|
+
# Homepage - Github
|
|
45
|
+
This 'dar-backup' package lives at: https://github.com/per2jensen/dar-backup
|
|
46
|
+
|
|
47
|
+
This python version is v2 of dar-backup, the first is made in bash.
|
|
48
|
+
|
|
49
|
+
# Config file
|
|
50
|
+
|
|
51
|
+
The default configuration is located here: ~/.config/dar-backup/dar-backup.conf
|
|
52
|
+
|
|
53
|
+
# How to run
|
|
54
|
+
|
|
55
|
+
## 1
|
|
56
|
+
Config file default location is $HOME/.config/dar-backup/dar-backup.conf
|
|
57
|
+
|
|
58
|
+
The name of the file is the `backup definition` name.
|
|
59
|
+
|
|
60
|
+
Make as many backup definitions as you need. Run them all in one go, or run one at a time using the `-d` option.
|
|
61
|
+
|
|
62
|
+
Example:
|
|
63
|
+
````
|
|
64
|
+
[MISC]
|
|
65
|
+
LOGFILE_LOCATION=/home/user/dar-backup.log
|
|
66
|
+
MAX_SIZE_VERIFICATION_MB = 20
|
|
67
|
+
MIN_SIZE_VERIFICATION_MB = 1
|
|
68
|
+
NO_FILES_VERIFICATION = 5
|
|
69
|
+
|
|
70
|
+
[DIRECTORIES]
|
|
71
|
+
BACKUP_DIR = /home/user/mnt/dir/
|
|
72
|
+
BACKUP.D_DIR = /home/user/.config/dar-backup/backup.d/
|
|
73
|
+
TEST_RESTORE_DIR = /tmp/dar-backup/restore/
|
|
74
|
+
|
|
75
|
+
[AGE]
|
|
76
|
+
# age settings are in days
|
|
77
|
+
DIFF_AGE = 100
|
|
78
|
+
INCR_AGE = 40
|
|
79
|
+
|
|
80
|
+
[PAR2]
|
|
81
|
+
ERROR_CORRECTION_PERCENT = 5
|
|
82
|
+
|
|
83
|
+
[PREREQ]
|
|
84
|
+
SCRIPT_1 = /home/user/programmer/dar-backup/prereq/mount-microserver.sh
|
|
85
|
+
# SCRIPT_2 = <something>
|
|
86
|
+
# more here if necessary
|
|
87
|
+
````
|
|
88
|
+
|
|
89
|
+
## 2
|
|
90
|
+
Put your backup definitions in the directory $BACKUP.D_DIR (defined in the config file)
|
|
91
|
+
|
|
92
|
+
The `dar` [documentation](http://dar.linux.free.fr/doc/man/dar.html#COMMANDS%20AND%20OPTIONS) has good information on file selection.
|
|
93
|
+
|
|
94
|
+
Example of backup definition for a home directory
|
|
95
|
+
````
|
|
96
|
+
|
|
97
|
+
# Switch to ordered selection mode, which means that the following
|
|
98
|
+
# options will be considered top to bottom
|
|
99
|
+
-am
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# Backup Root dir
|
|
103
|
+
-R /home/user
|
|
104
|
+
|
|
105
|
+
# Directories to backup below the Root dir
|
|
106
|
+
# if you only want to take a backup of /home/user/Documents
|
|
107
|
+
# -g Documents
|
|
108
|
+
|
|
109
|
+
# Directories to exclude below the Root dir
|
|
110
|
+
-P mnt
|
|
111
|
+
-P tmp
|
|
112
|
+
-P .cache
|
|
113
|
+
-P .config/Code/CachedData
|
|
114
|
+
-P .config/Code/Cache
|
|
115
|
+
-P ".config/Code/Service Worker"
|
|
116
|
+
-P .config/Code/logs
|
|
117
|
+
-P snap/firefox/common/.cache
|
|
118
|
+
-P git/darktable
|
|
119
|
+
|
|
120
|
+
# compression level
|
|
121
|
+
-z5
|
|
122
|
+
|
|
123
|
+
# no overwrite, if you rerun a backup, 'dar' halts and asks what to do
|
|
124
|
+
-n
|
|
125
|
+
|
|
126
|
+
# size of each slice in the archive
|
|
127
|
+
--slice 10G
|
|
128
|
+
|
|
129
|
+
# see https://github.com/per2jensen/dar-backup?tab=readme-ov-file#restore-test-exit-code-4
|
|
130
|
+
--comparison-field=ignore-owner
|
|
131
|
+
|
|
132
|
+
# bypass directores marked as cache directories
|
|
133
|
+
# http://dar.linux.free.fr/doc/Features.html
|
|
134
|
+
--cache-directory-tagging
|
|
135
|
+
````
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## 3
|
|
139
|
+
Installation is currently in a venv. These commands are installed in the venv:
|
|
140
|
+
- dar-back
|
|
141
|
+
- cleanup
|
|
142
|
+
|
|
143
|
+
To install, create a venc and run pip:
|
|
144
|
+
````
|
|
145
|
+
mkdir $HOME/tmp
|
|
146
|
+
cd $HOME/tmp
|
|
147
|
+
python3 -m venv venv # create the virtual environment
|
|
148
|
+
. venv/bin/activate # activate the virtual env
|
|
149
|
+
pip install dar-backup # run pip to install `dar-backup`
|
|
150
|
+
````
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
I have an alias in ~/.bashrc
|
|
154
|
+
````
|
|
155
|
+
alias db=". ~/programmer/dar-backup.py/venv/bin/activate; dar-backup -v"
|
|
156
|
+
````
|
|
157
|
+
|
|
158
|
+
Typing `db` at the command line gives this
|
|
159
|
+
````
|
|
160
|
+
(venv) user@machine:~$ db
|
|
161
|
+
dar-backup alpha-0.4
|
|
162
|
+
dar-backup.py source code is here: https://github.com/per2jensen/dar-backup
|
|
163
|
+
Licensed under GNU GENERAL PUBLIC LICENSE v3, see the supplied file "LICENSE" for details.
|
|
164
|
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
165
|
+
See section 15 and section 16 in the supplied "LICENSE" file.
|
|
166
|
+
````
|
|
167
|
+
|
|
168
|
+
`dar-backup -h` gives the usage output:
|
|
169
|
+
````
|
|
170
|
+
(venv) user@machine:~$ dar-backup -h
|
|
171
|
+
usage: dar-backup [-h] [--full-backup] [--differential-backup] [--incremental-backup] [-d BACKUP_DEFINITION]
|
|
172
|
+
[--config-file CONFIG_FILE] [--examples] [--list] [--list-contents LIST_CONTENTS]
|
|
173
|
+
[--selection SELECTION] [--restore RESTORE] [--restore-dir RESTORE_DIR] [--verbose]
|
|
174
|
+
[--log-level LOG_LEVEL] [--do-not-compare] [--version]
|
|
175
|
+
|
|
176
|
+
Backup and verify using dar backup definitions.
|
|
177
|
+
|
|
178
|
+
options:
|
|
179
|
+
-h, --help show this help message and exit
|
|
180
|
+
--full-backup Perform a full backup.
|
|
181
|
+
--differential-backup
|
|
182
|
+
Perform differential backup.
|
|
183
|
+
--incremental-backup Perform incremental backup.
|
|
184
|
+
-d BACKUP_DEFINITION, --backup-definition BACKUP_DEFINITION
|
|
185
|
+
Specific 'recipe' to select directories and files.
|
|
186
|
+
--config-file CONFIG_FILE, -c CONFIG_FILE
|
|
187
|
+
Path to 'dar-backup.conf'
|
|
188
|
+
--examples Examples of using dar-backup.py.
|
|
189
|
+
--list List available archives.
|
|
190
|
+
--list-contents LIST_CONTENTS
|
|
191
|
+
List the contents of the specified archive.
|
|
192
|
+
--selection SELECTION
|
|
193
|
+
dar file selection for listing/restoring specific files/directories.
|
|
194
|
+
--restore RESTORE Restore specified archive.
|
|
195
|
+
--restore-dir RESTORE_DIR
|
|
196
|
+
Directory to restore files to.
|
|
197
|
+
--verbose Print various status messages to screen
|
|
198
|
+
--log-level LOG_LEVEL
|
|
199
|
+
`debug` or `trace`
|
|
200
|
+
--do-not-compare do not compare restores to file system
|
|
201
|
+
--version, -v Show version information.
|
|
202
|
+
````
|
|
203
|
+
|
|
204
|
+
## 4
|
|
205
|
+
You are ready to do backups of all your backup definitions, if your backup definitions are
|
|
206
|
+
in place in BACKUP.D_DIR (see config file)
|
|
207
|
+
````
|
|
208
|
+
dar-backup --full-backup
|
|
209
|
+
````
|
|
210
|
+
|
|
211
|
+
or a backup of a single definition
|
|
212
|
+
````
|
|
213
|
+
dar-backup --full-backup -d <your backup definition>
|
|
214
|
+
````
|
|
215
|
+
|
|
216
|
+
## 5
|
|
217
|
+
|
|
218
|
+
Deactivate the virtual environment
|
|
219
|
+
````
|
|
220
|
+
deactivate
|
|
221
|
+
````
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
# list contents of an archive
|
|
228
|
+
```
|
|
229
|
+
. <the virtual evn>/bin/activate
|
|
230
|
+
dar-backup --list-contents example --selection "-X '*.xmp' -I '*2024-06-16*' -g home/pj/tmp/LUT-play"
|
|
231
|
+
deactivate
|
|
232
|
+
```
|
|
233
|
+
gives
|
|
234
|
+
```
|
|
235
|
+
[Data ][D][ EA ][FSA][Compr][S]| Permission | User | Group | Size | Date | filename
|
|
236
|
+
--------------------------------+------------+-------+-------+---------+-------------------------------+------------
|
|
237
|
+
[Saved][-] [-L-][ 0%][ ] drwxr-xr-x root root 113 Mio Sat May 11 16:16:48 2024 home
|
|
238
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 10:46:30 2024 home/pj
|
|
239
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 09:17:42 2024 home/pj/tmp
|
|
240
|
+
[Saved][-] [-L-][ 1%][ ] drwxrwxr-x pj pj 50 Mio Wed Jun 19 20:52:13 2024 home/pj/tmp/LUT-play
|
|
241
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 49 Mio Sun Jun 16 12:52:22 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15.NEF
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
# dar file selection exmaples
|
|
248
|
+
|
|
249
|
+
## select a directory
|
|
250
|
+
```
|
|
251
|
+
dar -l /tmp/example_FULL_2024-06-23 -g home/pj/tmp/LUT-play
|
|
252
|
+
```
|
|
253
|
+
gives
|
|
254
|
+
```
|
|
255
|
+
[Data ][D][ EA ][FSA][Compr][S]| Permission | User | Group | Size | Date | filename
|
|
256
|
+
--------------------------------+------------+-------+-------+---------+-------------------------------+------------
|
|
257
|
+
[Saved][-] [-L-][ 0%][ ] drwxr-xr-x root root 113 Mio Sat May 11 16:16:48 2024 home
|
|
258
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 10:46:30 2024 home/pj
|
|
259
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 09:17:42 2024 home/pj/tmp
|
|
260
|
+
[Saved][-] [-L-][ 1%][ ] drwxrwxr-x pj pj 50 Mio Wed Jun 19 20:52:13 2024 home/pj/tmp/LUT-play
|
|
261
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 49 Mio Sun Jun 16 12:52:22 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15.NEF
|
|
262
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 48 kio Sat Jun 22 21:51:24 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15.NEF.xmp
|
|
263
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 50 kio Sat Jun 22 21:51:25 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_01.NEF.xmp
|
|
264
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 51 kio Sat Jun 22 21:51:26 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_02.NEF.xmp
|
|
265
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 51 kio Sat Jun 22 21:51:27 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_03.NEF.xmp
|
|
266
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 51 kio Sat Jun 22 21:51:27 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_04.NEF.xmp
|
|
267
|
+
[Saved][ ] [-L-][ 97%][ ] -rw-rw-r-- pj pj 77 kio Sat Jun 22 21:50:16 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_05.NEF.xmp
|
|
268
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 52 kio Sat Jun 22 21:49:37 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_06.NEF.xmp
|
|
269
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:47 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_07.NEF.xmp
|
|
270
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:51:12 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_08.NEF.xmp
|
|
271
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:51:12 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_09.NEF.xmp
|
|
272
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:39 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_10.NEF.xmp
|
|
273
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:36 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_11.NEF.xmp
|
|
274
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:35 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_12.NEF.xmp
|
|
275
|
+
[Saved][ ] [-L-][ 88%][ ] -rw-rw-r-- pj pj 15 kio Sat Jun 22 21:51:11 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_13.NEF.xmp
|
|
276
|
+
[Saved][ ] [-L-][ 96%][ ] -rw-rw-r-- pj pj 84 kio Sat Jun 22 21:51:09 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_14.NEF.xmp
|
|
277
|
+
[Saved][ ] [-L-][ 96%][ ] -rw-rw-r-- pj pj 90 kio Sat Jun 22 21:51:04 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_15.NEF.xmp
|
|
278
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:51:15 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_16.NEF.xmp
|
|
279
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:48 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_17.NEF.xmp
|
|
280
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:19 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_18.NEF.xmp
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
## select file dates in the directory:
|
|
285
|
+
```
|
|
286
|
+
dar -l /tmp/example_FULL_2024-06-23 -I '*2024-06-16*' -g home/pj/tmp/LUT-play
|
|
287
|
+
```
|
|
288
|
+
gives
|
|
289
|
+
```
|
|
290
|
+
[Data ][D][ EA ][FSA][Compr][S]| Permission | User | Group | Size | Date | filename
|
|
291
|
+
--------------------------------+------------+-------+-------+---------+-------------------------------+------------
|
|
292
|
+
[Saved][-] [-L-][ 0%][ ] drwxr-xr-x root root 113 Mio Sat May 11 16:16:48 2024 home
|
|
293
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 10:46:30 2024 home/pj
|
|
294
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 09:17:42 2024 home/pj/tmp
|
|
295
|
+
[Saved][-] [-L-][ 1%][ ] drwxrwxr-x pj pj 50 Mio Wed Jun 19 20:52:13 2024 home/pj/tmp/LUT-play
|
|
296
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 49 Mio Sun Jun 16 12:52:22 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15.NEF
|
|
297
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 48 kio Sat Jun 22 21:51:24 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15.NEF.xmp
|
|
298
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 50 kio Sat Jun 22 21:51:25 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_01.NEF.xmp
|
|
299
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 51 kio Sat Jun 22 21:51:26 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_02.NEF.xmp
|
|
300
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 51 kio Sat Jun 22 21:51:27 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_03.NEF.xmp
|
|
301
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 51 kio Sat Jun 22 21:51:27 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_04.NEF.xmp
|
|
302
|
+
[Saved][ ] [-L-][ 97%][ ] -rw-rw-r-- pj pj 77 kio Sat Jun 22 21:50:16 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_05.NEF.xmp
|
|
303
|
+
[Saved][ ] [-L-][ 95%][ ] -rw-rw-r-- pj pj 52 kio Sat Jun 22 21:49:37 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_06.NEF.xmp
|
|
304
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:47 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_07.NEF.xmp
|
|
305
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:51:12 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_08.NEF.xmp
|
|
306
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:51:12 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_09.NEF.xmp
|
|
307
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:39 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_10.NEF.xmp
|
|
308
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:36 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_11.NEF.xmp
|
|
309
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:35 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_12.NEF.xmp
|
|
310
|
+
[Saved][ ] [-L-][ 88%][ ] -rw-rw-r-- pj pj 15 kio Sat Jun 22 21:51:11 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_13.NEF.xmp
|
|
311
|
+
[Saved][ ] [-L-][ 96%][ ] -rw-rw-r-- pj pj 84 kio Sat Jun 22 21:51:09 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_14.NEF.xmp
|
|
312
|
+
[Saved][ ] [-L-][ 96%][ ] -rw-rw-r-- pj pj 90 kio Sat Jun 22 21:51:04 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_15.NEF.xmp
|
|
313
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:51:15 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_16.NEF.xmp
|
|
314
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:48 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_17.NEF.xmp
|
|
315
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 24 kio Sat Jun 22 21:50:19 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15_18.NEF.xmp
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## exclude .xmp files from that date
|
|
319
|
+
```
|
|
320
|
+
dar -l /tmp/example_FULL_2024-06-23 -X '*.xmp' -I '*2024-06-16*' -g home/pj/tmp/LUT-play
|
|
321
|
+
```
|
|
322
|
+
gives
|
|
323
|
+
```
|
|
324
|
+
[Data ][D][ EA ][FSA][Compr][S]| Permission | User | Group | Size | Date | filename
|
|
325
|
+
--------------------------------+------------+-------+-------+---------+-------------------------------+------------
|
|
326
|
+
[Saved][-] [-L-][ 0%][ ] drwxr-xr-x root root 113 Mio Sat May 11 16:16:48 2024 home
|
|
327
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 10:46:30 2024 home/pj
|
|
328
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 09:17:42 2024 home/pj/tmp
|
|
329
|
+
[Saved][-] [-L-][ 1%][ ] drwxrwxr-x pj pj 50 Mio Wed Jun 19 20:52:13 2024 home/pj/tmp/LUT-play
|
|
330
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 49 Mio Sun Jun 16 12:52:22 2024 home/pj/tmp/LUT-play/2024-06-16_12:52:22,15.NEF
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Nice :-)
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
# Restoring
|
|
338
|
+
|
|
339
|
+
## a single file
|
|
340
|
+
```
|
|
341
|
+
. <the virtual env>/bin/activate
|
|
342
|
+
# the path/to/file is relative to the Root when the backup was taken
|
|
343
|
+
dar-backup --restore <archive_name> --selection "-g path/to/file"
|
|
344
|
+
deactivate
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## .NEF from a specific date
|
|
348
|
+
```
|
|
349
|
+
. <the virtual env>/bin/activate
|
|
350
|
+
# the path/to/file is relative to the Root when the backup was taken
|
|
351
|
+
dar-backup --restore <archive_name> --selection "-X '*.xmp' -I '*2024-06-16*' -g home/pj/tmp/LUT-play"
|
|
352
|
+
deactivate
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|