dar-backup 0.6.20__py3-none-any.whl → 0.6.21__py3-none-any.whl
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/Changelog.md +22 -0
- dar_backup/README.md +413 -228
- dar_backup/__about__.py +6 -1
- dar_backup/cleanup.py +2 -0
- dar_backup/dar_backup.py +24 -5
- dar_backup/demo.py +2 -5
- dar_backup/installer.py +41 -16
- dar_backup/manager.py +3 -2
- dar_backup/util.py +98 -15
- {dar_backup-0.6.20.dist-info → dar_backup-0.6.21.dist-info}/METADATA +414 -229
- dar_backup-0.6.21.dist-info/RECORD +23 -0
- {dar_backup-0.6.20.dist-info → dar_backup-0.6.21.dist-info}/entry_points.txt +1 -0
- dar_backup-0.6.20.dist-info/RECORD +0 -23
- {dar_backup-0.6.20.dist-info → dar_backup-0.6.21.dist-info}/WHEEL +0 -0
- {dar_backup-0.6.20.dist-info → dar_backup-0.6.21.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dar-backup
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.21
|
|
4
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
5
|
Project-URL: GPG Public Key, https://keys.openpgp.org/search?q=dar-backup@pm.me
|
|
6
6
|
Project-URL: Homepage, https://github.com/per2jensen/dar-backup/tree/main/v2
|
|
@@ -695,16 +695,20 @@ Requires-Dist: rich>=13.0.0
|
|
|
695
695
|
Description-Content-Type: text/markdown
|
|
696
696
|
|
|
697
697
|
<!-- markdownlint-disable MD024 -->
|
|
698
|
-
#
|
|
698
|
+
# `dar-backup`
|
|
699
|
+
|
|
700
|
+
**Reliable DAR backups, automated in clean Python**
|
|
699
701
|
|
|
700
702
|
[](https://codecov.io/gh/per2jensen/dar-backup)
|
|
703
|
+

|
|
704
|
+
[](https://pypi.org/project/dar-backup/)
|
|
701
705
|
[](https://pypi.org/project/dar-backup/)
|
|
702
706
|
[](https://pypi.org/project/dar-backup/)
|
|
703
707
|
|
|
704
708
|
The wonderful 'dar' [Disk Archiver](https://github.com/Edrusb/DAR) is used for
|
|
705
|
-
the heavy lifting, together with the
|
|
709
|
+
the heavy lifting, together with the [parchive](https://github.com/Parchive/par2cmdline) suite in these scripts.
|
|
706
710
|
|
|
707
|
-
This is the `Python` based **version 2** of `dar-backup`.
|
|
711
|
+
This is the `Python` based [**version 2**](https://github.com/per2jensen/dar-backup/tree/main/v2) of `dar-backup`.
|
|
708
712
|
|
|
709
713
|
## TL;DR
|
|
710
714
|
|
|
@@ -712,13 +716,15 @@ This is the `Python` based **version 2** of `dar-backup`.
|
|
|
712
716
|
|
|
713
717
|
## Table of Contents
|
|
714
718
|
|
|
715
|
-
- [
|
|
719
|
+
- [Reliable `dar` backups wrapped in Python](#dar-backup)
|
|
716
720
|
- [My use case](#my-use-case)
|
|
717
721
|
- [License](#license)
|
|
722
|
+
- [Changelog version 2](https://github.com/per2jensen/dar-backup/blob/main/v2/Changelog.md)
|
|
718
723
|
- [Status](#status)
|
|
719
724
|
- [GPG Signing key](#gpg-signing-key)
|
|
720
725
|
- [Breaking change in version 0.6.0](#breaking-change-in-version-060)
|
|
721
726
|
- [Homepage - Github](#homepage---github)
|
|
727
|
+
- [Community](#community)
|
|
722
728
|
- [Requirements](#requirements)
|
|
723
729
|
- [Principles](#dar-backup-principles)
|
|
724
730
|
- [How to run](#how-to-run)
|
|
@@ -739,8 +745,7 @@ This is the `Python` based **version 2** of `dar-backup`.
|
|
|
739
745
|
- [List contents of an archive](#list-contents-of-an-archive)
|
|
740
746
|
- [dar file selection examples](#dar-file-selection-examples)
|
|
741
747
|
- [Select a directory](#select-a-directory)
|
|
742
|
-
- [
|
|
743
|
-
- [Exclude .xmp files from that date](#exclude-xmp-files-from-that-date)
|
|
748
|
+
- [Include and exclude some file](#select-files-with-z50-in-the-file-name-and-exclude-xmp-files)
|
|
744
749
|
- [Restoring](#restoring)
|
|
745
750
|
- [Default location for restores](#default-location-for-restores)
|
|
746
751
|
- [--restore-dir option](#--restore-dir-option)
|
|
@@ -760,6 +765,7 @@ This is the `Python` based **version 2** of `dar-backup`.
|
|
|
760
765
|
- [Separate log file for command output](#separate-log-file-for-command-output)
|
|
761
766
|
- [Skipping cache directories](#skipping-cache-directories)
|
|
762
767
|
- [Progress bar + current directory](#progress-bar-and-current-directory)
|
|
768
|
+
- [Shell Autocompletion](#shell-autocompletion)
|
|
763
769
|
- [Todo](#todo)
|
|
764
770
|
- [Known Limitations / Edge Cases](#known-limitations--edge-cases)
|
|
765
771
|
- [Reference](#reference)
|
|
@@ -769,8 +775,9 @@ This is the `Python` based **version 2** of `dar-backup`.
|
|
|
769
775
|
- [manager](#manager-options)
|
|
770
776
|
- [cleanup](#cleanup-options)
|
|
771
777
|
- [clean-log](#clean-log-options)
|
|
772
|
-
- [installer](#installer-options)
|
|
773
778
|
- [dar-backup-systemd](#dar-backup-systemd)
|
|
779
|
+
- [Installer](#installer)
|
|
780
|
+
- [demo](#demo)
|
|
774
781
|
|
|
775
782
|
## My use case
|
|
776
783
|
|
|
@@ -783,7 +790,7 @@ I have cloud storage mounted on a directory within my home dir. The filesystem i
|
|
|
783
790
|
|
|
784
791
|
- Backup my cloud storage to something local (cloud is convenient, but I want control over my backups)
|
|
785
792
|
- Backup primarily photos, video and different types of documents
|
|
786
|
-
- Have a simple
|
|
793
|
+
- Have a simple 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.
|
|
787
794
|
- During backup archives must be tested and a restore test (however small) performed
|
|
788
795
|
- Archives stored on a server with a reliable file system (easy to mount a directory over sshfs)
|
|
789
796
|
- Easy to verify archive's integrity, after being moved around.
|
|
@@ -793,7 +800,7 @@ I have cloud storage mounted on a directory within my home dir. The filesystem i
|
|
|
793
800
|
## License
|
|
794
801
|
|
|
795
802
|
These scripts are licensed under the GPLv3 license.
|
|
796
|
-
Read more here: [GNU
|
|
803
|
+
Read more here: [GNU GPL3.0](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.
|
|
797
804
|
|
|
798
805
|
## Status
|
|
799
806
|
|
|
@@ -805,9 +812,13 @@ As of February 13, 2025, I have changed the status from alpha --> beta, as the f
|
|
|
805
812
|
|
|
806
813
|
To increase the security and authenticity of dar-backup packages, all releases from v2-beta-0.6.18 onwards will be digitally signed using the GPG key below.
|
|
807
814
|
|
|
808
|
-
|
|
815
|
+
<br>
|
|
816
|
+
|
|
817
|
+
<details>
|
|
818
|
+
|
|
819
|
+
<summary>🎯 GPG Signing Key Details</summary>
|
|
809
820
|
|
|
810
|
-
|
|
821
|
+
```text
|
|
811
822
|
Name: Per Jensen (author of dar-backup)
|
|
812
823
|
Email: dar-backup@pm.me
|
|
813
824
|
Primary key: 4592 D739 6DBA EFFD 0845 02B8 5CCE C7E1 6814 A36E
|
|
@@ -816,9 +827,13 @@ Created: 2025-03-29
|
|
|
816
827
|
Expires: 2030-03-28
|
|
817
828
|
Key type: ed25519 (primary, SC)
|
|
818
829
|
Subkeys: ed25519 (S), ed25519 (A), cv25519 (E)
|
|
819
|
-
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
<br>
|
|
820
833
|
|
|
821
|
-
|
|
834
|
+
<details>
|
|
835
|
+
|
|
836
|
+
<summary>🎯 Where to Find Release Signatures</summary>
|
|
822
837
|
|
|
823
838
|
PyPI does *Not* host .asc Signature Files
|
|
824
839
|
|
|
@@ -826,7 +841,7 @@ Although the `dar-backup` packages on PyPI are GPG-signed, PyPI itself does **no
|
|
|
826
841
|
|
|
827
842
|
Therefore, you will not find `.asc` files on PyPI.
|
|
828
843
|
|
|
829
|
-
|
|
844
|
+
**Where to Get `.asc` Signature Files**
|
|
830
845
|
|
|
831
846
|
You can always download the signed release artifacts and their `.asc` files from the official GitHub Releases page:
|
|
832
847
|
|
|
@@ -842,43 +857,55 @@ Each release includes:
|
|
|
842
857
|
|
|
843
858
|
- `dar_backup-x.y.z-py3-none-any.whl.asc`
|
|
844
859
|
|
|
845
|
-
|
|
860
|
+
</details>
|
|
861
|
+
|
|
862
|
+
<br>
|
|
863
|
+
|
|
864
|
+
<details>
|
|
865
|
+
|
|
866
|
+
<summary>🎯 How to Verify a Release from GitHub</summary>
|
|
846
867
|
|
|
847
868
|
1. Import the GPG public key:
|
|
848
869
|
|
|
849
|
-
|
|
870
|
+
```bash
|
|
850
871
|
curl https://keys.openpgp.org/vks/v1/by-fingerprint/4592D7396DBAEFFD084502B85CCEC7E16814A36E | gpg --import
|
|
851
|
-
|
|
872
|
+
```
|
|
852
873
|
|
|
853
874
|
2. Download the wheel or tarball and its .asc signature from the GitHub.
|
|
854
875
|
|
|
855
876
|
3. Run GPG to verify it:
|
|
856
877
|
|
|
857
|
-
|
|
878
|
+
```bash
|
|
858
879
|
gpg --verify dar_backup-x.y.z.tar.gz.asc dar_backup-x.y.z.tar.gz
|
|
859
880
|
# or
|
|
860
881
|
gpg --verify dar_backup-x.y.z-py3-none-any.whl.asc dar_backup-x.y.z-py3-none-any.whl
|
|
861
|
-
|
|
882
|
+
```
|
|
862
883
|
|
|
863
884
|
4. If the signature is valid, you'll see:
|
|
864
885
|
|
|
865
|
-
|
|
886
|
+
```text
|
|
866
887
|
gpg: Good signature from "Per Jensen (author of dar-backup) <dar-backup@pm.me>"
|
|
867
|
-
|
|
888
|
+
```
|
|
868
889
|
|
|
869
890
|
🛡️ Reminder: Verify the signing subkey
|
|
870
891
|
|
|
871
892
|
Only this subkey is used to sign PyPI packages:
|
|
872
893
|
|
|
873
|
-
|
|
894
|
+
```text
|
|
874
895
|
B54F 5682 F28D BA36 22D7 8E04 58DB FADB BBAC 1BB1
|
|
875
|
-
|
|
896
|
+
```
|
|
876
897
|
|
|
877
898
|
You can view it with:
|
|
878
899
|
|
|
879
|
-
|
|
900
|
+
```bash
|
|
880
901
|
gpg --list-keys --with-subkey-fingerprints dar-backup@pm.me
|
|
881
|
-
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
</details>
|
|
905
|
+
|
|
906
|
+
</details>
|
|
907
|
+
|
|
908
|
+
<br>
|
|
882
909
|
|
|
883
910
|
### Breaking change in version 0.6.0
|
|
884
911
|
|
|
@@ -890,17 +917,22 @@ Version 0.6.0 and forwards requires the config variable *COMMAND_TIMEOUT_SECS* i
|
|
|
890
917
|
|
|
891
918
|
This python version is v2 of dar-backup, v1 is made in bash.
|
|
892
919
|
|
|
920
|
+
## Community
|
|
921
|
+
|
|
922
|
+
Please review the [Code of Conduct](https://github.com/per2jensen/dar-backup/blob/main/CODE_OF_CONDUCT.md) to help keep this project welcoming and focused.
|
|
923
|
+
|
|
893
924
|
## Requirements
|
|
894
925
|
|
|
895
926
|
- dar
|
|
896
927
|
- par2
|
|
897
928
|
- python3
|
|
929
|
+
- python3-venv
|
|
898
930
|
|
|
899
931
|
On Ubuntu, install the requirements this way:
|
|
900
932
|
|
|
901
|
-
|
|
902
|
-
sudo apt install dar par2 python3
|
|
903
|
-
|
|
933
|
+
```bash
|
|
934
|
+
sudo apt install dar par2 python3 python3-venv
|
|
935
|
+
```
|
|
904
936
|
|
|
905
937
|
## dar-backup principles
|
|
906
938
|
|
|
@@ -951,7 +983,9 @@ Installation is currently in a venv. These commands are installed in the venv:
|
|
|
951
983
|
- cleanup
|
|
952
984
|
- manager
|
|
953
985
|
- clean-log
|
|
986
|
+
- dar-backup-systemd
|
|
954
987
|
- installer
|
|
988
|
+
- demo
|
|
955
989
|
|
|
956
990
|
Note:
|
|
957
991
|
|
|
@@ -959,44 +993,53 @@ The module `inputimeout` is installed into the venv and used for the confirmatio
|
|
|
959
993
|
|
|
960
994
|
To install, create a venv and run pip:
|
|
961
995
|
|
|
962
|
-
|
|
996
|
+
```bash
|
|
963
997
|
mkdir $HOME/tmp
|
|
964
998
|
cd $HOME/tmp
|
|
965
999
|
python3 -m venv venv # create the virtual environment
|
|
966
1000
|
. venv/bin/activate # activate the virtual env
|
|
967
1001
|
pip install dar-backup # run pip to install `dar-backup`
|
|
968
|
-
|
|
1002
|
+
```
|
|
969
1003
|
|
|
970
1004
|
I have an alias in ~/.bashrc pointing to my venv:
|
|
971
1005
|
|
|
972
|
-
|
|
1006
|
+
```bash
|
|
973
1007
|
alias db=". ~/tmp/venv/bin/activate; dar-backup -v"
|
|
974
|
-
|
|
1008
|
+
```
|
|
975
1009
|
|
|
976
|
-
|
|
1010
|
+
drop the alias into ~/.bashrc like this:
|
|
977
1011
|
|
|
978
|
-
|
|
1012
|
+
```bash
|
|
1013
|
+
grep -qxF 'alias db=". ~/tmp/venv/bin/activate; dar-backup -v"' ~/.bashrc \
|
|
1014
|
+
|| echo 'alias db=". ~/tmp/venv/bin/activate; dar-backup -v"' >> ~/.bashrc
|
|
1015
|
+
|
|
1016
|
+
source ~/.bashrc
|
|
1017
|
+
```
|
|
1018
|
+
|
|
1019
|
+
Typing `db` at the command line gives something like this:
|
|
1020
|
+
|
|
1021
|
+
```bash
|
|
979
1022
|
(venv) user@machine:~$ db
|
|
980
1023
|
dar-backup 0.6.12
|
|
981
1024
|
dar-backup.py source code is here: https://github.com/per2jensen/dar-backup
|
|
982
1025
|
Licensed under GNU GENERAL PUBLIC LICENSE v3, see the supplied file "LICENSE" for details.
|
|
983
1026
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
984
1027
|
See section 15 and section 16 in the supplied "LICENSE" file.
|
|
985
|
-
|
|
1028
|
+
```
|
|
986
1029
|
|
|
987
1030
|
### 2 - configuration
|
|
988
1031
|
|
|
989
|
-
The dar-backup
|
|
1032
|
+
The dar-backup `demo` is non-destructive and stops if some of the default directories exist.
|
|
990
1033
|
|
|
991
|
-
Run
|
|
1034
|
+
Run `demo`
|
|
992
1035
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1036
|
+
```bash
|
|
1037
|
+
demo --install
|
|
1038
|
+
```
|
|
996
1039
|
|
|
997
1040
|
The output is
|
|
998
1041
|
|
|
999
|
-
|
|
1042
|
+
```text
|
|
1000
1043
|
Directories created: `/home/user/dar-backup/` and `/home/user/.config/dar-backup`
|
|
1001
1044
|
Config file deployed to /home/user/.config/dar-backup/dar-backup.conf
|
|
1002
1045
|
Default backup definition deployed to /home/user/.config/dar-backup/backup.d/default
|
|
@@ -1004,7 +1047,7 @@ Default backup definition deployed to /home/user/.config/dar-backup/backup.d/def
|
|
|
1004
1047
|
2. Then you can run `dar-backup --full-backup` to create a backup.
|
|
1005
1048
|
3. List backups with `dar-backup --list`
|
|
1006
1049
|
4. List contents of a backup with `dar-backup --list-contents <backup-name>`
|
|
1007
|
-
|
|
1050
|
+
```
|
|
1008
1051
|
|
|
1009
1052
|
### 3 - generate catalog databases
|
|
1010
1053
|
|
|
@@ -1012,9 +1055,9 @@ Generate the archive catalog database(s).
|
|
|
1012
1055
|
|
|
1013
1056
|
`dar-backup` expects the catalog databases to be in place, it does not automatically create them (by design)
|
|
1014
1057
|
|
|
1015
|
-
|
|
1058
|
+
```bash
|
|
1016
1059
|
manager --create-db
|
|
1017
|
-
|
|
1060
|
+
```
|
|
1018
1061
|
|
|
1019
1062
|
### 4 - do FULL backups
|
|
1020
1063
|
|
|
@@ -1023,9 +1066,9 @@ Prereq:
|
|
|
1023
1066
|
|
|
1024
1067
|
You are ready to do backups of all your backup definitions.
|
|
1025
1068
|
|
|
1026
|
-
|
|
1069
|
+
```bash
|
|
1027
1070
|
dar-backup --full-backup
|
|
1028
|
-
|
|
1071
|
+
```
|
|
1029
1072
|
|
|
1030
1073
|
If you want to see dar-backup's log entries in the terminal, use the `--log-stdout` option. This can be useful if dar-backup is started by systemd.
|
|
1031
1074
|
|
|
@@ -1033,17 +1076,17 @@ If you want more log messages, use the `--verbose` or `--log-level debug` for ev
|
|
|
1033
1076
|
|
|
1034
1077
|
If you want a backup of a single definition, use the `-d <backup definition>` option. The definition's name is the filename of the definition in the `backup.d` config directory.
|
|
1035
1078
|
|
|
1036
|
-
|
|
1079
|
+
```bash
|
|
1037
1080
|
dar-backup --full-backup -d <your backup definition>
|
|
1038
|
-
|
|
1081
|
+
```
|
|
1039
1082
|
|
|
1040
1083
|
### 5 - deactivate venv
|
|
1041
1084
|
|
|
1042
1085
|
Deactivate the virtual environment (venv)
|
|
1043
1086
|
|
|
1044
|
-
|
|
1087
|
+
```bash
|
|
1045
1088
|
deactivate
|
|
1046
|
-
|
|
1089
|
+
```
|
|
1047
1090
|
|
|
1048
1091
|
## Config
|
|
1049
1092
|
|
|
@@ -1055,7 +1098,7 @@ If you have your config file somewhere else, use the `--config` option to point
|
|
|
1055
1098
|
|
|
1056
1099
|
Tilde `~` and environment variables can be used in the paths for various file locations.
|
|
1057
1100
|
|
|
1058
|
-
|
|
1101
|
+
```text
|
|
1059
1102
|
[MISC]
|
|
1060
1103
|
LOGFILE_LOCATION=~/.dar-backup.log
|
|
1061
1104
|
MAX_SIZE_VERIFICATION_MB = 20
|
|
@@ -1070,6 +1113,9 @@ COMMAND_TIMEOUT_SECS = 86400
|
|
|
1070
1113
|
BACKUP_DIR = /some/where/dar-backup/backups/
|
|
1071
1114
|
BACKUP.D_DIR = /some/where/dar-backup/backup.d
|
|
1072
1115
|
TEST_RESTORE_DIR = /tmp/dar-backup/restore/
|
|
1116
|
+
# Optional parameter
|
|
1117
|
+
# If you want to store the catalog databases away from the BACKUP_DIR, use the MANAGER_DB_DIR variable.
|
|
1118
|
+
#MANAGER_DB_DIR = /some/where/else/
|
|
1073
1119
|
|
|
1074
1120
|
[AGE]
|
|
1075
1121
|
# age settings are in days
|
|
@@ -1088,7 +1134,7 @@ SCRIPT_1 = ls -l /tmp
|
|
|
1088
1134
|
[POSTREQ]
|
|
1089
1135
|
SCRIPT_1 = df -h
|
|
1090
1136
|
#SCRIPT_2 = another_script.sh
|
|
1091
|
-
|
|
1137
|
+
```
|
|
1092
1138
|
|
|
1093
1139
|
### .darrc
|
|
1094
1140
|
|
|
@@ -1098,7 +1144,7 @@ You can override the default `.darrc` using the `--darrc` option.
|
|
|
1098
1144
|
|
|
1099
1145
|
The default `.darrc` contents are as follows:
|
|
1100
1146
|
|
|
1101
|
-
|
|
1147
|
+
```text
|
|
1102
1148
|
# .darrc configuration file for `dar` as used by the `dar-backup` script.
|
|
1103
1149
|
# `dar-backup` lives here: https://github.com/per2jensen/dar-backup
|
|
1104
1150
|
|
|
@@ -1219,7 +1265,7 @@ compress-exclusion:
|
|
|
1219
1265
|
# Now we swap back to case sensitive mode for masks which is the default
|
|
1220
1266
|
#mode:
|
|
1221
1267
|
-acase
|
|
1222
|
-
|
|
1268
|
+
```
|
|
1223
1269
|
|
|
1224
1270
|
### Backup definition example
|
|
1225
1271
|
|
|
@@ -1228,7 +1274,7 @@ The name of the file is the name of the backup definition.
|
|
|
1228
1274
|
|
|
1229
1275
|
You can use as many backup definitions as you need.
|
|
1230
1276
|
|
|
1231
|
-
|
|
1277
|
+
```text
|
|
1232
1278
|
# Switch to ordered selection mode, which means that the following
|
|
1233
1279
|
# options will be considered top to bottom
|
|
1234
1280
|
-am
|
|
@@ -1262,7 +1308,7 @@ You can use as many backup definitions as you need.
|
|
|
1262
1308
|
# http://dar.linux.free.fr/doc/Features.html
|
|
1263
1309
|
# https://bford.info/cachedir/
|
|
1264
1310
|
--cache-directory-tagging
|
|
1265
|
-
|
|
1311
|
+
```
|
|
1266
1312
|
|
|
1267
1313
|
## Generate systemd files
|
|
1268
1314
|
|
|
@@ -1272,7 +1318,7 @@ The timers are set as the author uses them, modify to your taste and needs.
|
|
|
1272
1318
|
|
|
1273
1319
|
Example run:
|
|
1274
1320
|
|
|
1275
|
-
|
|
1321
|
+
```bash
|
|
1276
1322
|
dar-backup-systemd --venv /home/user/tmp/venv --dar-path /home/user/.local/dar/bin
|
|
1277
1323
|
Generated dar-full-backup.service and dar-full-backup.timer
|
|
1278
1324
|
→ Fires on: *-12-30 10:03:00
|
|
@@ -1282,7 +1328,7 @@ Generated dar-incr-backup.service and dar-incr-backup.timer
|
|
|
1282
1328
|
→ Fires on: *-*-04/3 19:03:00
|
|
1283
1329
|
Generated dar-clean.service and dar-clean.timer
|
|
1284
1330
|
→ Fires on: *-*-* 21:07:00
|
|
1285
|
-
|
|
1331
|
+
```
|
|
1286
1332
|
|
|
1287
1333
|
## Systemctl examples
|
|
1288
1334
|
|
|
@@ -1300,17 +1346,17 @@ systemctl --user daemon-reload
|
|
|
1300
1346
|
|
|
1301
1347
|
Verify your timers are set up as you want:
|
|
1302
1348
|
|
|
1303
|
-
|
|
1349
|
+
```bash
|
|
1304
1350
|
systemctl --user list-timers
|
|
1305
|
-
|
|
1351
|
+
```
|
|
1306
1352
|
|
|
1307
1353
|
## Service: dar-backup --incremental-backup
|
|
1308
1354
|
|
|
1309
|
-
This is an
|
|
1355
|
+
This is an example of a systemd user service unit.
|
|
1310
1356
|
|
|
1311
1357
|
File: dar-incr-backup.service
|
|
1312
1358
|
|
|
1313
|
-
|
|
1359
|
+
```bash
|
|
1314
1360
|
/tmp/test$ dar-backup-systemd --venv '$HOME/programmer/dar-backup.py/venv' --dar-path '$HOME/.local/dar/bin'
|
|
1315
1361
|
|
|
1316
1362
|
Generated dar-full-backup.service and dar-full-backup.timer
|
|
@@ -1336,7 +1382,7 @@ RemainAfterExit=no
|
|
|
1336
1382
|
|
|
1337
1383
|
|
|
1338
1384
|
ExecStart=/bin/bash -c 'PATH=$HOME/.local/dar/bin:$PATH && . $HOME/programmer/dar-backup.py/venv/bin/activate && dar-backup -I --verbose --log-stdout'
|
|
1339
|
-
|
|
1385
|
+
```
|
|
1340
1386
|
|
|
1341
1387
|
## Timer: dar-backup --incremental-backup
|
|
1342
1388
|
|
|
@@ -1344,7 +1390,7 @@ This is an example of a systemd user timer
|
|
|
1344
1390
|
|
|
1345
1391
|
File: dar-incr-backup.timer
|
|
1346
1392
|
|
|
1347
|
-
|
|
1393
|
+
```text
|
|
1348
1394
|
[Unit]
|
|
1349
1395
|
Description=dar-backup INCR timer
|
|
1350
1396
|
|
|
@@ -1354,7 +1400,7 @@ Persistent=true
|
|
|
1354
1400
|
|
|
1355
1401
|
[Install]
|
|
1356
1402
|
WantedBy=timers.target
|
|
1357
|
-
|
|
1403
|
+
```
|
|
1358
1404
|
|
|
1359
1405
|
## systemd timer note
|
|
1360
1406
|
|
|
@@ -1362,118 +1408,94 @@ WantedBy=timers.target
|
|
|
1362
1408
|
|
|
1363
1409
|
## list contents of an archive
|
|
1364
1410
|
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1411
|
+
```bash
|
|
1412
|
+
# Activate your virtual environment
|
|
1413
|
+
source <the virtual evn>/bin/activate
|
|
1414
|
+
dar-backup --list-contents media-files_INCR_2025-05-10
|
|
1415
|
+
# Deactivate when done
|
|
1368
1416
|
deactivate
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
gives
|
|
1417
|
+
```
|
|
1372
1418
|
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
[Saved][-] [-L-][ 0%][ ]
|
|
1377
|
-
[Saved][
|
|
1378
|
-
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj
|
|
1379
|
-
[Saved][-] [-L-][ 1%][ ] drwxrwxr-x pj
|
|
1380
|
-
[Saved][ ] [-L-][
|
|
1419
|
+
gives something like
|
|
1420
|
+
|
|
1421
|
+
```text
|
|
1422
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 2 Gio Sat May 10 14:15:07 2025 home/pj
|
|
1423
|
+
[Saved][ ] [-L-][ 93%][ ] -rw-rw-r-- pj pj 29 kio Fri May 9 16:45:38 2025 home/pj/data/2023/2023-02-11-Udstilling-Fredericia/DSC_0568.NEF.xmp
|
|
1424
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 2 Gio Fri May 9 12:49:04 2025 home/pj/data/2025
|
|
1425
|
+
[Saved][-] [-L-][ 1%][ ] drwxrwxr-x pj pj 193 Mio Thu May 8 15:59:17 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR
|
|
1426
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 15 Mio Thu May 8 15:52:27 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0563.NEF
|
|
1427
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 10 Mio Thu May 8 15:52:27 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0563.JPG
|
|
1428
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 9 Mio Thu May 8 15:51:53 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0559.JPG
|
|
1429
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 16 Mio Thu May 8 15:51:45 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0558.NEF
|
|
1430
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 12 Mio Thu May 8 15:51:45 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0558.JPG
|
|
1431
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 16 Mio Thu May 8 15:51:24 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0557.NEF
|
|
1432
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 12 Mio Thu May 8 15:51:23 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0557.JPG
|
|
1433
|
+
[Saved][ ] [-L-][ 91%][ ] -rw-rw-r-- pj pj 22 kio Thu May 8 15:59:58 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0557.JPG.xmp
|
|
1434
|
+
[Saved][ ] [-L-][ 92%][ ] -rw-rw-r-- pj pj 30 kio Thu May 8 16:00:36 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0557.NEF.xmp
|
|
1435
|
+
[Saved][ ] [-L-][ 91%][ ] -rw-rw-r-- pj pj 22 kio Thu May 8 16:00:29 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR/DSC_0558.JPG.xmp
|
|
1381
1436
|
```
|
|
1382
1437
|
|
|
1383
1438
|
## dar file selection examples
|
|
1384
1439
|
|
|
1385
|
-
|
|
1440
|
+
> ⚠️ **Quoting matters**
|
|
1441
|
+
>
|
|
1442
|
+
> Always pass `--selection` as `--selection="-I '*.NEF'"` to ensure it’s treated as a single argument.
|
|
1443
|
+
>
|
|
1444
|
+
> Avoid splitting `--selection` and the string into separate tokens.
|
|
1386
1445
|
|
|
1387
|
-
|
|
1388
|
-
dar -l /tmp/example_FULL_2024-06-23 -g home/pj/tmp/LUT-play
|
|
1389
|
-
```
|
|
1446
|
+
**Why does --selection give “expected one argument” error?**
|
|
1390
1447
|
|
|
1391
|
-
|
|
1448
|
+
This happens when the shell splits the quoted string or interprets globs before `dar-backup` sees them.
|
|
1449
|
+
✅ Use: `--selection="-I '*.NEF'"`
|
|
1450
|
+
❌ Avoid: `--selection "-I '*.NEF'"`
|
|
1392
1451
|
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
[Saved][-] [-L-][ 0%][ ] drwxr-xr-x root root 113 Mio Sat May 11 16:16:48 2024 home
|
|
1397
|
-
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 10:46:30 2024 home/pj
|
|
1398
|
-
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 113 Mio Sun Jun 23 09:17:42 2024 home/pj/tmp
|
|
1399
|
-
[Saved][-] [-L-][ 1%][ ] drwxrwxr-x pj pj 50 Mio Wed Jun 19 20:52:13 2024 home/pj/tmp/LUT-play
|
|
1400
|
-
[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
|
|
1401
|
-
[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
|
|
1402
|
-
[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
|
|
1403
|
-
[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
|
|
1404
|
-
[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
|
|
1405
|
-
[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
|
|
1406
|
-
[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
|
|
1407
|
-
[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
|
|
1408
|
-
[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
|
|
1409
|
-
[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
|
|
1410
|
-
[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
|
|
1411
|
-
[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
|
|
1412
|
-
[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
|
|
1413
|
-
[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
|
|
1414
|
-
[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
|
|
1415
|
-
[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
|
|
1416
|
-
[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
|
|
1417
|
-
[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
|
|
1418
|
-
[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
|
|
1419
|
-
[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
|
|
1420
|
-
````
|
|
1452
|
+
> 💡 **Tip:** See [dar's documentation](http://dar.linux.free.fr/doc/man/dar.html#COMMANDS%20AND%20OPTIONS)
|
|
1453
|
+
|
|
1454
|
+
### select a directory
|
|
1421
1455
|
|
|
1422
|
-
|
|
1456
|
+
Select files and sub directories in `home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling`
|
|
1423
1457
|
|
|
1424
|
-
```
|
|
1425
|
-
dar -
|
|
1458
|
+
```bash
|
|
1459
|
+
dar-backup --list-contents media-files_INCR_2025-05-10 --selection="-g 'home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling'"
|
|
1426
1460
|
```
|
|
1427
1461
|
|
|
1428
1462
|
gives
|
|
1429
1463
|
|
|
1430
|
-
```
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
[Saved][
|
|
1434
|
-
[Saved][
|
|
1435
|
-
[Saved][
|
|
1436
|
-
[Saved][
|
|
1437
|
-
[Saved][
|
|
1438
|
-
[Saved][ ] [-L-][
|
|
1439
|
-
[Saved][ ] [-L-][
|
|
1440
|
-
[Saved][ ] [-L-][
|
|
1441
|
-
[Saved][ ] [-L-][
|
|
1442
|
-
|
|
1443
|
-
[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
|
|
1444
|
-
[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
|
|
1445
|
-
[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
|
|
1446
|
-
[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
|
|
1447
|
-
[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
|
|
1448
|
-
[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
|
|
1449
|
-
[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
|
|
1450
|
-
[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
|
|
1451
|
-
[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
|
|
1452
|
-
[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
|
|
1453
|
-
[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
|
|
1454
|
-
[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
|
|
1455
|
-
[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
|
|
1456
|
-
[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
|
|
1464
|
+
```text
|
|
1465
|
+
...
|
|
1466
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 29 Mio Fri May 9 10:33:42 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0572.NEF
|
|
1467
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 28 Mio Fri May 9 10:33:12 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0571.NEF
|
|
1468
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 25 Mio Fri May 9 10:33:08 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0570.NEF
|
|
1469
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 27 Mio Fri May 9 10:32:46 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0569.NEF
|
|
1470
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 27 Mio Fri May 9 10:32:46 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0568.NEF
|
|
1471
|
+
[Saved][-] [-L-][ 1%][ ] drwxrwxr-x pj pj 833 Mio Fri May 9 12:49:57 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/jpeg
|
|
1472
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 11 Mio Fri May 9 10:32:45 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/jpeg/Z50_0568.JPG
|
|
1473
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 11 Mio Fri May 9 10:32:46 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/jpeg/Z50_0569.JPG
|
|
1474
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 9 Mio Fri May 9 10:33:08 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/jpeg/Z50_0570.JPG
|
|
1475
|
+
[Saved][ ] [-L-][ 1%][X] -rw-rw-r-- pj pj 13 Mio Fri May 9 10:33:12 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/jpeg/Z50_0571.JPG
|
|
1476
|
+
...
|
|
1457
1477
|
```
|
|
1458
1478
|
|
|
1459
|
-
### exclude .xmp files
|
|
1460
|
-
|
|
1461
|
-
``` bash
|
|
1462
|
-
dar -l /tmp/example_FULL_2024-06-23 -X '*.xmp' -I '*2024-06-16*' -g home/pj/tmp/LUT-play
|
|
1479
|
+
### select files with "Z50" in the file name and exclude .xmp files
|
|
1463
1480
|
|
|
1481
|
+
```bash
|
|
1482
|
+
dar-backup --list-contents media-files_INCR_2025-05-10 --selection="-I '*Z50*' -X '*.xmp'"
|
|
1464
1483
|
```
|
|
1465
1484
|
|
|
1466
|
-
gives
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
[
|
|
1470
|
-
|
|
1471
|
-
[Saved][-] [-L-][
|
|
1472
|
-
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj
|
|
1473
|
-
[Saved][
|
|
1474
|
-
[Saved][
|
|
1475
|
-
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj
|
|
1476
|
-
|
|
1485
|
+
gives something like
|
|
1486
|
+
|
|
1487
|
+
```text
|
|
1488
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 2 Gio Sat May 10 14:15:07 2025 home/pj
|
|
1489
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 2 Gio Fri May 9 12:49:04 2025 home/pj/data/2025
|
|
1490
|
+
[Saved][-] [-L-][ 1%][ ] drwxrwxr-x pj pj 193 Mio Thu May 8 15:59:17 2025 home/pj/data/2025/2025-05-09-Viltrox-25mm-AIR
|
|
1491
|
+
[Saved][-] [-L-][ 0%][ ] drwxrwxr-x pj pj 2 Gio Fri May 9 16:47:37 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling
|
|
1492
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 26 Mio Fri May 9 11:26:16 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0633.NEF
|
|
1493
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 26 Mio Fri May 9 11:26:16 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0632.NEF
|
|
1494
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 28 Mio Fri May 9 11:09:04 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0631.NEF
|
|
1495
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 29 Mio Fri May 9 11:09:03 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0630.NEF
|
|
1496
|
+
[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- pj pj 29 Mio Fri May 9 11:09:03 2025 home/pj/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0629.NEF
|
|
1497
|
+
...
|
|
1498
|
+
```
|
|
1477
1499
|
|
|
1478
1500
|
## Restoring
|
|
1479
1501
|
|
|
@@ -1493,7 +1515,7 @@ The directory supplied functions as the Root of the restore operation.
|
|
|
1493
1515
|
|
|
1494
1516
|
A backup has been taken using this backup definition:
|
|
1495
1517
|
|
|
1496
|
-
```
|
|
1518
|
+
```text
|
|
1497
1519
|
-R /
|
|
1498
1520
|
-g home/user/Documents
|
|
1499
1521
|
```
|
|
@@ -1502,16 +1524,15 @@ When restoring and using `/tmp` for --restore-dir, the restored files can be fou
|
|
|
1502
1524
|
|
|
1503
1525
|
### a single file
|
|
1504
1526
|
|
|
1505
|
-
```
|
|
1527
|
+
```text
|
|
1506
1528
|
. <the virtual env>/bin/activate
|
|
1507
1529
|
dar-backup --restore <archive_name> --selection "-g path/to/file"
|
|
1508
1530
|
deactivate
|
|
1509
|
-
|
|
1510
1531
|
```
|
|
1511
1532
|
|
|
1512
1533
|
### a directory
|
|
1513
1534
|
|
|
1514
|
-
```
|
|
1535
|
+
```bash
|
|
1515
1536
|
. <the virtual env>/bin/activate
|
|
1516
1537
|
dar-backup --restore <archive_name> --selection "-g path/to/directory"
|
|
1517
1538
|
deactivate
|
|
@@ -1519,7 +1540,7 @@ deactivate
|
|
|
1519
1540
|
|
|
1520
1541
|
### .NEF from a specific date
|
|
1521
1542
|
|
|
1522
|
-
```
|
|
1543
|
+
```bash
|
|
1523
1544
|
. <the virtual env>/bin/activate
|
|
1524
1545
|
dar-backup --restore <archive_name> --selection "-X '*.xmp' -I '*2024-06-16*' -g home/pj/tmp/LUT-play"
|
|
1525
1546
|
deactivate
|
|
@@ -1527,9 +1548,9 @@ deactivate
|
|
|
1527
1548
|
|
|
1528
1549
|
### restore test fails with exit code 4
|
|
1529
1550
|
|
|
1530
|
-
|
|
1551
|
+
`dar` in newer versions emits a question about file ownership, which is "answered" with a "no" via the "-Q" option. That in turn leads to an error code 4.
|
|
1531
1552
|
|
|
1532
|
-
Thus the dar option
|
|
1553
|
+
Thus the dar option `--comparison-field=ignore-owner` has been placed in the supplied [.darrc](#darrc) file (located in the virtual environment where dar-backup is installed).
|
|
1533
1554
|
|
|
1534
1555
|
This causes dar to restore without an error.
|
|
1535
1556
|
|
|
@@ -1542,7 +1563,7 @@ If exit code 5 is emitted on the restore test, FSA (File System specific Attribu
|
|
|
1542
1563
|
That (might) occur if you backup a file stored on one type of filesystem, and restore it on another type.
|
|
1543
1564
|
My home directory is on a btrfs filesystem, while /tmp (for the restore test) is on zfs.
|
|
1544
1565
|
|
|
1545
|
-
The restore test can result in an exit code 5, due to the different filesystems used. In order to avoid the errors, the
|
|
1566
|
+
The restore test can result in an exit code 5, due to the different filesystems used. In order to avoid the errors, the option `--fsa-scope none` can be used. That will restult in FSA's not being restored.
|
|
1546
1567
|
|
|
1547
1568
|
If you need to use this option, un-comment it in the [.darrc](#darrc) file (located in the virtual environment where dar-backup is installed)
|
|
1548
1569
|
|
|
@@ -1552,28 +1573,28 @@ If you need to use this option, un-comment it in the [.darrc](#darrc) file (loca
|
|
|
1552
1573
|
|
|
1553
1574
|
You can run a par2 verification on an archive like this:
|
|
1554
1575
|
|
|
1555
|
-
|
|
1576
|
+
```bash
|
|
1556
1577
|
for file in <archive>*.dar.par2; do
|
|
1557
1578
|
par2 verify "$file"
|
|
1558
1579
|
done
|
|
1559
|
-
|
|
1580
|
+
```
|
|
1560
1581
|
|
|
1561
1582
|
if there are problems with a slice, try to repair it like this:
|
|
1562
1583
|
|
|
1563
|
-
|
|
1584
|
+
```bash
|
|
1564
1585
|
par2 repair <archive>.<slice number>.dar.par2
|
|
1565
|
-
|
|
1586
|
+
```
|
|
1566
1587
|
|
|
1567
1588
|
### Par2 create redundancy files
|
|
1568
1589
|
|
|
1569
1590
|
If you have merged archives, you will need to create the .par2 redundency files manually.
|
|
1570
1591
|
Here is an example
|
|
1571
1592
|
|
|
1572
|
-
|
|
1593
|
+
```bash
|
|
1573
1594
|
for file in <some-archive>_FULL_yyyy-mm-dd.*; do
|
|
1574
1595
|
par2 c -r5 -n1 "$file"
|
|
1575
1596
|
done
|
|
1576
|
-
|
|
1597
|
+
```
|
|
1577
1598
|
|
|
1578
1599
|
where "c" is create, -r5 is 5% redundency and -n1 is 1 redundency file
|
|
1579
1600
|
|
|
@@ -1586,7 +1607,7 @@ One way to do that, is to let dar create a FULL archive from scratch, another is
|
|
|
1586
1607
|
|
|
1587
1608
|
I do backups of my homedir. Here it is shown how a FULL archive is merged with a DIFF, creating a new FULL archive.
|
|
1588
1609
|
|
|
1589
|
-
|
|
1610
|
+
```bash
|
|
1590
1611
|
dar --merge pj-homedir_FULL_2021-09-12 -A pj-homedir_FULL_2021-06-06 -@pj-homedir_DIFF_2021-08-29 -s 12G
|
|
1591
1612
|
|
|
1592
1613
|
# test the new FULL archive
|
|
@@ -1596,8 +1617,7 @@ dar -t pj-homedir_FULL_2021-09-12
|
|
|
1596
1617
|
for file in pj-homedir_FULL_yyyy-mm-dd.*.dar; do
|
|
1597
1618
|
par2 c -r5 -n1 "$file"
|
|
1598
1619
|
done
|
|
1599
|
-
|
|
1600
|
-
````
|
|
1620
|
+
```
|
|
1601
1621
|
|
|
1602
1622
|
### dar manager databases
|
|
1603
1623
|
|
|
@@ -1645,8 +1665,144 @@ dar-backup displays 2 visual artifacts to show progress.
|
|
|
1645
1665
|
|
|
1646
1666
|
The indicators are not shown if dar-backup is run from systemd or if it is used in terminal multiplexers like `tmux` or `screen`. So no polluting of journald logs.
|
|
1647
1667
|
|
|
1668
|
+
### Shell autocompletion
|
|
1669
|
+
|
|
1670
|
+
The `dar-backup`, `manager`, and `cleanup` scripts now support dynamic Bash tab-completion, making them easier and faster to use.
|
|
1671
|
+
|
|
1672
|
+
✅ Features
|
|
1673
|
+
|
|
1674
|
+
- Autocomplete for all long options (--config-file, --restore, etc.)
|
|
1675
|
+
|
|
1676
|
+
- Dynamic suggestions based on your config:
|
|
1677
|
+
|
|
1678
|
+
- --backup-definition shows available definitions from backup.d/
|
|
1679
|
+
|
|
1680
|
+
- show relevant archives when a backup definition has been chosen:
|
|
1681
|
+
|
|
1682
|
+
dar-backup: --restore, --list-contents, and --alternate-reference-archive
|
|
1683
|
+
|
|
1684
|
+
cleanup: --cleanup-specific-archives
|
|
1685
|
+
|
|
1686
|
+
manager: --list-archive-contents, --add-specific-archive (autocomplete those **not* in the catalog database), --remove-specific-archive
|
|
1687
|
+
|
|
1688
|
+
- Supports paths like ~ and $HOME correctly
|
|
1689
|
+
|
|
1690
|
+
#### Use it
|
|
1691
|
+
|
|
1692
|
+
Try typing:
|
|
1693
|
+
|
|
1694
|
+
```bash
|
|
1695
|
+
dar-backup --<TAB>
|
|
1696
|
+
```
|
|
1697
|
+
|
|
1698
|
+
You should see all available flags like --full-backup, --restore, etc.
|
|
1699
|
+
|
|
1700
|
+
Try completion of backup definition and then list contents:
|
|
1701
|
+
|
|
1702
|
+
```bash
|
|
1703
|
+
dar-backup --backup-definition <TAB>
|
|
1704
|
+
dar-backup -d <the chosen backup-definition> --list-contents <TAB>
|
|
1705
|
+
```
|
|
1706
|
+
|
|
1707
|
+
#### Archive name completion (smart, context-aware)
|
|
1708
|
+
|
|
1709
|
+
When using `manager--list-archive-contents`, the tab-completer suggests valid archive names.
|
|
1710
|
+
|
|
1711
|
+
The behavior is smart and context-aware:
|
|
1712
|
+
|
|
1713
|
+
- If a --backup-definition (-d) is provided, archive suggestions are restricted to that .db catalog.
|
|
1714
|
+
|
|
1715
|
+
- If no backup definition is given, the completer will:
|
|
1716
|
+
|
|
1717
|
+
- Scan all .db files in the backup_dir
|
|
1718
|
+
|
|
1719
|
+
- Aggregate archive names across all catalogs
|
|
1720
|
+
|
|
1721
|
+
- Sort results by:
|
|
1722
|
+
|
|
1723
|
+
- Backup name (e.g. pCloudDrive, media-files)
|
|
1724
|
+
|
|
1725
|
+
- Date inside the archive name (e.g. 2025-04-19)
|
|
1726
|
+
|
|
1727
|
+
It’s blazing fast and designed for large backup sets.
|
|
1728
|
+
|
|
1729
|
+
```bash
|
|
1730
|
+
# With a backup definition
|
|
1731
|
+
manager -d pCloudDrive --list-archive-contents <TAB>
|
|
1732
|
+
# ⤷ Suggests: pCloudDrive_FULL_2025-03-04, pCloudDrive_INCR_2025-04-19, ...
|
|
1733
|
+
|
|
1734
|
+
# Without a backup definition
|
|
1735
|
+
manager --list-archive-contents <TAB>
|
|
1736
|
+
# ⤷ Suggests: all archives across all known backup definitions
|
|
1737
|
+
# ⤷ Example: media-files_FULL_2025-01-04, pCloudDrive_INCR_2025-04-19, ...
|
|
1738
|
+
|
|
1739
|
+
# Filter by prefix
|
|
1740
|
+
manager --list-archive-contents media-<TAB>
|
|
1741
|
+
# ⤷ Suggests: media-files_FULL_2025-01-04, media-files_INCR_2025-02-20, ...
|
|
1742
|
+
```
|
|
1743
|
+
|
|
1744
|
+
#### Enabling Bash completion
|
|
1745
|
+
|
|
1746
|
+
Try auto completion in your session:
|
|
1747
|
+
|
|
1748
|
+
```bash
|
|
1749
|
+
eval "$(register-python-argcomplete dar-backup)"
|
|
1750
|
+
eval "$(register-python-argcomplete cleanup)"
|
|
1751
|
+
eval "$(register-python-argcomplete manager)"
|
|
1752
|
+
complete -o nosort -C 'python -m argcomplete cleanup' cleanup
|
|
1753
|
+
complete -o nosort -C 'python -m argcomplete manager' manager
|
|
1754
|
+
```
|
|
1755
|
+
|
|
1756
|
+
To make it persistent across sessions, add this to your ~/.bashrc:
|
|
1757
|
+
|
|
1758
|
+
```bash
|
|
1759
|
+
# Enable autocompletion for dar-backup
|
|
1760
|
+
eval "$(register-python-argcomplete dar-backup)"
|
|
1761
|
+
eval "$(register-python-argcomplete cleanup)"
|
|
1762
|
+
eval "$(register-python-argcomplete manager)"
|
|
1763
|
+
# This disables bash sorting, so sorting is by <backup definition> and <date>
|
|
1764
|
+
complete -o nosort -C 'python -m argcomplete cleanup' cleanup
|
|
1765
|
+
complete -o nosort -C 'python -m argcomplete manager' manager
|
|
1766
|
+
```
|
|
1767
|
+
|
|
1768
|
+
If you're using a virtual environment and register-python-argcomplete isn't in your global PATH, use:
|
|
1769
|
+
|
|
1770
|
+
```bash
|
|
1771
|
+
# Enable autocompletion for dar-backup
|
|
1772
|
+
eval "$($(which register-python-argcomplete) dar-backup)"
|
|
1773
|
+
eval "$($(which register-python-argcomplete) cleanup)"
|
|
1774
|
+
eval "$($(which register-python-argcomplete) manager)"
|
|
1775
|
+
|
|
1776
|
+
# If it's not working, try reactivating your virtualenv and restarting your terminal.
|
|
1777
|
+
```
|
|
1778
|
+
|
|
1779
|
+
Then reload your shell:
|
|
1780
|
+
|
|
1781
|
+
```bash
|
|
1782
|
+
source ~/.bashrc
|
|
1783
|
+
```
|
|
1784
|
+
|
|
1785
|
+
#### Enable Zsh Completion
|
|
1786
|
+
|
|
1787
|
+
If you're using Zsh, add this to your .zshrc:
|
|
1788
|
+
|
|
1789
|
+
```zsh
|
|
1790
|
+
autoload -U bashcompinit
|
|
1791
|
+
bashcompinit
|
|
1792
|
+
eval "$(register-python-argcomplete dar-backup)"
|
|
1793
|
+
eval "$(register-python-argcomplete cleanup)"
|
|
1794
|
+
eval "$(register-python-argcomplete manager)"
|
|
1795
|
+
```
|
|
1796
|
+
|
|
1797
|
+
Then reload Zsh:
|
|
1798
|
+
|
|
1799
|
+
```zsh
|
|
1800
|
+
source ~/.zshrc
|
|
1801
|
+
```
|
|
1802
|
+
|
|
1648
1803
|
## Todo
|
|
1649
1804
|
|
|
1805
|
+
- When run interactively, a progress bar during test and par2 generation would be nice.
|
|
1650
1806
|
- Look into a way to move the .par2 files away from the `dar` slices, to maximize chance of good redundancy.
|
|
1651
1807
|
- Add option to dar-backup to use the `dar` option `--fsa-scope none`
|
|
1652
1808
|
|
|
@@ -1658,54 +1814,65 @@ One backup definition per file
|
|
|
1658
1814
|
|
|
1659
1815
|
.par2 files created for each slice (may be moved in future)
|
|
1660
1816
|
|
|
1817
|
+
## Projects these scripts benefit from
|
|
1818
|
+
|
|
1819
|
+
1. [The wonderful dar achiver](https://github.com/Edrusb/DAR)
|
|
1820
|
+
2. [The Parchive suite](https://github.com/Parchive)
|
|
1821
|
+
3. [shellcheck - a bash linter](https://github.com/koalaman/shellcheck)
|
|
1822
|
+
4. [Ubuntu of course :-)](https://ubuntu.com/)
|
|
1823
|
+
5. [PyPI](https://pypi.org/)
|
|
1824
|
+
6. Tracking PyPI downloads with [pypi-total-downloads-tracker](https://github.com/per2jensen/pypi-total-downloads-tracker)
|
|
1825
|
+
|
|
1661
1826
|
## Reference
|
|
1662
1827
|
|
|
1663
1828
|
### CLI Tools Overview
|
|
1664
1829
|
|
|
1665
|
-
| Command
|
|
1666
|
-
|
|
1667
|
-
|
|
|
1668
|
-
|
|
|
1669
|
-
|
|
|
1670
|
-
|
|
|
1671
|
-
|
|
|
1672
|
-
|
|
|
1830
|
+
| Command | Description |
|
|
1831
|
+
|----------------------|-------------------------------------------|
|
|
1832
|
+
| [dar-backup](#dar-backup-options)| Perform full, differential, or incremental backups with verification and restore testing |
|
|
1833
|
+
| [manager](#manager-options) | Maintain and query catalog databases for archives |
|
|
1834
|
+
| [cleanup](#cleanup-options) | Remove outdated DIFF/INCR archives (and optionally FULLs) |
|
|
1835
|
+
| [clean-log](#clean-log-options) | Clean up excessive log output from dar command logs |
|
|
1836
|
+
| [dar-backup-systemd](#dar-backup-systemd-options) | Generate (and optionally install) systemd timers and services for automated backups |
|
|
1837
|
+
| [installer](#installer-options) | Set up directories and optionally create catalog databases according to a config file |
|
|
1838
|
+
| [demo](#demo-options) | Set up required directories and default config files |
|
|
1673
1839
|
|
|
1674
1840
|
### test coverage
|
|
1675
1841
|
|
|
1676
1842
|
Running
|
|
1677
1843
|
|
|
1678
|
-
|
|
1844
|
+
```bash
|
|
1679
1845
|
pytest --cov=dar_backup tests/
|
|
1680
|
-
|
|
1846
|
+
```
|
|
1681
1847
|
|
|
1682
|
-
|
|
1848
|
+
Results for a version 0.6.19 in this report:
|
|
1683
1849
|
|
|
1684
|
-
|
|
1685
|
-
---------- coverage: platform linux, python 3.12.3-final-0 -----------
|
|
1850
|
+
```text
|
|
1686
1851
|
Name Stmts Miss Cover
|
|
1687
1852
|
----------------------------------------------------------
|
|
1688
1853
|
src/dar_backup/__about__.py 1 0 100%
|
|
1689
1854
|
src/dar_backup/__init__.py 0 0 100%
|
|
1690
1855
|
src/dar_backup/clean_log.py 68 13 81%
|
|
1691
|
-
src/dar_backup/cleanup.py
|
|
1692
|
-
src/dar_backup/command_runner.py
|
|
1693
|
-
src/dar_backup/config_settings.py 66
|
|
1694
|
-
src/dar_backup/dar_backup.py
|
|
1856
|
+
src/dar_backup/cleanup.py 196 17 91%
|
|
1857
|
+
src/dar_backup/command_runner.py 80 3 96%
|
|
1858
|
+
src/dar_backup/config_settings.py 66 7 89%
|
|
1859
|
+
src/dar_backup/dar_backup.py 539 56 90%
|
|
1695
1860
|
src/dar_backup/dar_backup_systemd.py 56 7 88%
|
|
1696
1861
|
src/dar_backup/installer.py 59 6 90%
|
|
1697
|
-
src/dar_backup/manager.py
|
|
1862
|
+
src/dar_backup/manager.py 403 54 87%
|
|
1698
1863
|
src/dar_backup/rich_progress.py 70 7 90%
|
|
1699
|
-
src/dar_backup/util.py
|
|
1864
|
+
src/dar_backup/util.py 231 24 90%
|
|
1700
1865
|
----------------------------------------------------------
|
|
1701
|
-
TOTAL
|
|
1702
|
-
|
|
1866
|
+
TOTAL 1769 194 89%
|
|
1867
|
+
```
|
|
1703
1868
|
|
|
1704
|
-
###
|
|
1869
|
+
### Dar-backup options
|
|
1705
1870
|
|
|
1706
|
-
This script does backups, validation and restoring.
|
|
1871
|
+
This script does backups including par2 redundancy, validation and restoring.
|
|
1707
1872
|
|
|
1708
|
-
|
|
1873
|
+
Available options:
|
|
1874
|
+
|
|
1875
|
+
```bash
|
|
1709
1876
|
-F, --full-backup Perform a full backup.
|
|
1710
1877
|
-D, --differential-backup Perform a differential backup.
|
|
1711
1878
|
-I, --incremental-backup Perform an incremental backup.
|
|
@@ -1724,34 +1891,39 @@ This script does backups, validation and restoring. It has the following options
|
|
|
1724
1891
|
--log-level <level> `debug` or `trace`, default is `info`.
|
|
1725
1892
|
--log-stdout Also print log messages to stdout.
|
|
1726
1893
|
--do-not-compare Do not compare restores to file system.
|
|
1727
|
-
-v --version Show version and license information.
|
|
1894
|
+
-v, --version Show version and license information.
|
|
1728
1895
|
```
|
|
1729
1896
|
|
|
1730
|
-
###
|
|
1897
|
+
### Manager Options
|
|
1898
|
+
|
|
1899
|
+
This script manages `dar` databases and catalogs.
|
|
1731
1900
|
|
|
1732
|
-
|
|
1901
|
+
Available options:
|
|
1733
1902
|
|
|
1734
|
-
```
|
|
1735
|
-
-c, --config-file
|
|
1903
|
+
```bash
|
|
1904
|
+
-c, --config-file <path> Path to dar-backup.conf.
|
|
1736
1905
|
--create-db Create missing databases for all backup definitions.
|
|
1737
1906
|
--alternate-archive-dir <path> Use this directory instead of BACKUP_DIR in the config file.
|
|
1738
1907
|
--add-dir <path> Add all archive catalogs in this directory to databases.
|
|
1739
|
-
-d, --backup-def <name> Restrict to
|
|
1740
|
-
--add-specific-archive <archive> Add
|
|
1741
|
-
--remove-specific-archive <archive> Remove
|
|
1908
|
+
-d, --backup-def <name> Restrict operations to this backup definition.
|
|
1909
|
+
--add-specific-archive <archive> Add a specific archive to the catalog database.
|
|
1910
|
+
--remove-specific-archive <archive> Remove a specific archive from the catalog database.
|
|
1742
1911
|
-l, --list-catalogs List catalogs in databases for all backup definitions.
|
|
1743
|
-
--list-
|
|
1744
|
-
--list-archive-contents <archive> List contents of an archive’s catalog, given the archive name.
|
|
1912
|
+
--list-archive-contents <archive> List the contents of an archive’s catalog by archive name.
|
|
1745
1913
|
--find-file <file> Search catalogs for a specific file.
|
|
1746
1914
|
--verbose Enable verbose output.
|
|
1747
|
-
--log-level <level> `debug` or `trace`, default is `info`
|
|
1915
|
+
--log-level <level> Set log level (`debug` or `trace`, default is `info`).
|
|
1748
1916
|
```
|
|
1749
1917
|
|
|
1750
|
-
###
|
|
1918
|
+
### Cleanup options
|
|
1751
1919
|
|
|
1752
|
-
This script
|
|
1920
|
+
This script removes old backups and par2 files according to `[AGE]` settings in config file.
|
|
1753
1921
|
|
|
1754
|
-
|
|
1922
|
+
Catalogs in catalog databases are also removed.
|
|
1923
|
+
|
|
1924
|
+
Supported options:
|
|
1925
|
+
|
|
1926
|
+
```bash
|
|
1755
1927
|
-d, --backup-definition Backup definition to cleanup.
|
|
1756
1928
|
-c, --config-file Path to 'dar-backup.conf'
|
|
1757
1929
|
-v, --version Show version & license information.
|
|
@@ -1764,11 +1936,11 @@ This script cleans up old backups and par2 files. Supported options:
|
|
|
1764
1936
|
--test-mode This is used when running pytest test cases
|
|
1765
1937
|
```
|
|
1766
1938
|
|
|
1767
|
-
###
|
|
1939
|
+
### Clean-log options
|
|
1768
1940
|
|
|
1769
1941
|
This script removes excessive logging output from `dar` logs, improving readability and efficiency. Available options:
|
|
1770
1942
|
|
|
1771
|
-
```
|
|
1943
|
+
```bash
|
|
1772
1944
|
-f, --file <path> Specify the log file(s) to be cleaned.
|
|
1773
1945
|
-c, --config-file <path> Path to dar-backup.conf.
|
|
1774
1946
|
--dry-run Show which lines would be removed without modifying the file.
|
|
@@ -1776,9 +1948,33 @@ This script removes excessive logging output from `dar` logs, improving readabil
|
|
|
1776
1948
|
-h, --help Displays usage info
|
|
1777
1949
|
```
|
|
1778
1950
|
|
|
1779
|
-
###
|
|
1951
|
+
### Dar-backup-systemd options
|
|
1952
|
+
|
|
1953
|
+
Generates and optionally install systemd user service units and timers.
|
|
1954
|
+
|
|
1955
|
+
```bash
|
|
1956
|
+
-h, --help Show this help message and exit
|
|
1957
|
+
--venv VENV Path to the Python venv with dar-backup
|
|
1958
|
+
--dar-path DAR_PATH Optional path to dar binary's directory
|
|
1959
|
+
--install Install the units to ~/.config/systemd/user
|
|
1960
|
+
```
|
|
1961
|
+
|
|
1962
|
+
### Installer options
|
|
1963
|
+
|
|
1964
|
+
Sets up `dar-backup` according to provided config file.
|
|
1780
1965
|
|
|
1781
|
-
|
|
1966
|
+
The installer creates the necessary backup catalog databases if `--create-db` is given.
|
|
1967
|
+
|
|
1968
|
+
```bash
|
|
1969
|
+
--config Sets up `dar-backup`.
|
|
1970
|
+
--create-db Create backup catalog databases.
|
|
1971
|
+
-v, --version Display version and licensing information.
|
|
1972
|
+
-h, --help Displays usage info
|
|
1973
|
+
```
|
|
1974
|
+
|
|
1975
|
+
### Demo options
|
|
1976
|
+
|
|
1977
|
+
Sets up `dar-backup` in a demo configuration.
|
|
1782
1978
|
|
|
1783
1979
|
It is non-destructive and stops if directories are already in place.
|
|
1784
1980
|
|
|
@@ -1795,19 +1991,8 @@ Sets up demo config files:
|
|
|
1795
1991
|
- ~/.config/dar-backup/dar-backup.conf
|
|
1796
1992
|
- ~/.config/dar-backup/backup.d/default
|
|
1797
1993
|
|
|
1798
|
-
```
|
|
1994
|
+
```bash
|
|
1799
1995
|
-i, --install Sets up `dar-backup`.
|
|
1800
1996
|
-v, --version Display version and licensing information.
|
|
1801
1997
|
-h, --help Displays usage info
|
|
1802
1998
|
```
|
|
1803
|
-
|
|
1804
|
-
### dar-backup-systemd
|
|
1805
|
-
|
|
1806
|
-
Generates and optionally install systemd user service units and timers
|
|
1807
|
-
|
|
1808
|
-
``` code
|
|
1809
|
-
-h, --help Show this help message and exit
|
|
1810
|
-
--venv VENV Path to the Python venv with dar-backup
|
|
1811
|
-
--dar-path DAR_PATH Optional path to dar binary's directory
|
|
1812
|
-
--install Install the units to ~/.config/systemd/user
|
|
1813
|
-
```
|