Closed stratosgear closed 2 years ago
Hmmm, that is a puzzle. Presumably if you looked in the log file you would not see commentary indicating that the commands are being run. It appears as if Emborg is not getting those settings, though I do not understand why. I noticed that you showed me your shared settings file ( ~/.config/emborg/settings ) but not the settings file for the docker configuration ( ~/.config/emborg/docker ). Can you show me that file, and your log file?
Contents of docker
is very simple:
root@raspberrypi4:~/.config/emborg# cat docker
# Settings for home configuration
# use of absolute paths is recommended
src_dirs = '''
/var/lib/docker/volumes/xx1
/var/lib/docker/volumes/xx2
/var/lib/docker/volumes/xx3
'''
excludes = '''
**/*~
**/__pycache__
**/*.pyc
**/.*.swp
**/.*.swo
''' # list of files or directories to skip
Are you talking about these logs?:
root@raspberrypi4:~/.config/emborg# emborg create
root@raspberrypi4:~/.config/emborg# emborg log
emborg: version 1.26.0 (2021-09-03)
emborg: invoked as: /usr/local/bin/emborg create
emborg: invoked on: Tuesday, 14 September 2021 at 1:04:19 PM CEST
working dir = /
running create command
Setting BORG_PASSPHRASE.
Borg-related environment variables: {
'BORG_PASSPHRASE': '<redacted>',
'BORG_DISPLAY_PASSPHRASE': 'no',
}
running:
borg create \
--exclude '**/*~' \
--exclude '**/__pycache__' \
--exclude '**/*.pyc' \
--exclude '**/.*.swp' \
--exclude '**/.*.swo' \
--stats \
--compression lz4 \
--exclude-caches \
--exclude-if-present .nobackup \
--one-file-system \
--remote-ratelimit 2000 \
'xxx:/home/xxx/borg_backups/raspberrypi4-root-docker::raspberrypi4-{now}' \
/var/lib/docker/volumes/xx1 \
/var/lib/docker/volumes/xx2 \
/var/lib/docker/volumes/xx3
running in: /
starts at: 2021-09-14T13:04:19.643807+02:00
ends at: 2021-09-14T13:04:47.738919+02:00
elapsed = 0:00:28.095112
Borg stderr:
------------------------------------------------------------------------------
Archive name: raspberrypi4-2021-09-14T13:04:20
Archive fingerprint: 25828854683b83bb613dadb0cfd9519ca984e984ad97641c0dbd
Time (start): Tue, 2021-09-14 13:04:23
Time (end): Tue, 2021-09-14 13:04:45
Duration: 22.83 seconds
Number of files: 5865
Utilization of max. archive size: 0%
------------------------------------------------------------------------------
Original size Compressed size Deduplicated size
This archive: 155.44 MB 79.29 MB 25.03 MB
All archives: 721.32 MB 380.92 MB 142.93 MB
Unique chunks Total chunks
Chunk index: 5276 29547
------------------------------------------------------------------------------
update date file
Checking archive ...
Using existing BORG_PASSPHRASE.
Borg-related environment variables: {
'BORG_PASSPHRASE': '<redacted>',
'BORG_DISPLAY_PASSPHRASE': 'no',
}
running:
borg list \
--remote-ratelimit 2000 \
--prefix raspberrypi4- \
--json \
xxx:/home/xxx/borg_backups/raspberrypi4-root-docker
running in: /root/.config/emborg
starts at: 2021-09-14T13:04:47.746434+02:00
ends at: 2021-09-14T13:04:50.732242+02:00
elapsed = 0:00:02.985808
Borg stdout:
{
"archives": [
{
"archive": "raspberrypi4-2021-09-13T21:57:14",
"barchive": "raspberrypi4-2021-09-13T21:57:14",
"id": "b609bf131f9b780557eeeab6eb1f3cf69f337a43a3741b65df7cdf",
"name": "raspberrypi4-2021-09-13T21:57:14",
"start": "2021-09-13T21:57:17.000000",
"time": "2021-09-13T21:57:17.000000"
},
{
"archive": "raspberrypi4-2021-09-13T22:07:55",
"barchive": "raspberrypi4-2021-09-13T22:07:55",
"id": "a33ef033705d18b5f86a4b6d7ccc871ab62ee3b66177229cee8deb",
"name": "raspberrypi4-2021-09-13T22:07:55",
"start": "2021-09-13T22:07:57.000000",
"time": "2021-09-13T22:07:57.000000"
},
{
"archive": "raspberrypi4-2021-09-13T22:17:47",
"barchive": "raspberrypi4-2021-09-13T22:17:47",
"id": "96df9a3a9c0c2c2cdee6150f8f135eefaa86bf4c8c0b56fa4817c",
"name": "raspberrypi4-2021-09-13T22:17:47",
"start": "2021-09-13T22:17:49.000000",
"time": "2021-09-13T22:17:49.000000"
},
{
"archive": "raspberrypi4-2021-09-13T22:26:45",
"barchive": "raspberrypi4-2021-09-13T22:26:45",
"id": "3b231ca280c9f06e7c543f63426ccf3f77aab3649f31adf09cfc",
"name": "raspberrypi4-2021-09-13T22:26:45",
"start": "2021-09-13T22:26:47.000000",
"time": "2021-09-13T22:26:47.000000"
},
{
"archive": "raspberrypi4-2021-09-14T13:04:20",
"barchive": "raspberrypi4-2021-09-14T13:04:20",
"id": "258288549d1002cdadb0aef1cfd9519ca984e984ad97641c0dbd",
"name": "raspberrypi4-2021-09-14T13:04:20",
"start": "2021-09-14T13:04:23.000000",
"time": "2021-09-14T13:04:23.000000"
}
],
"encryption": {
"keyfile": "/root/.config/borg/keys/xxx__home_xxx_borg_backups_raspberrypi4_root_docker",
"mode": "keyfile"
},
"repository": {
"id": "a8246409a0ed9fa26a043437dc11256e256d3b0f0862e2c8e0908b9",
"last_modified": "2021-09-14T13:04:46.000000",
"location": "ssh://xxx/home/xxx/borg_backups/raspberrypi4-root-docker"
}
}
Using existing BORG_PASSPHRASE.
Borg-related environment variables: {
'BORG_PASSPHRASE': '<redacted>',
'BORG_DISPLAY_PASSPHRASE': 'no',
}
running:
borg check \
--remote-ratelimit 2000 \
--prefix raspberrypi4- \
xxx:/home/xxx/borg_backups/raspberrypi4-root-docker::raspberrypi4-2021-09-14T13:04:20
running in: /root/.config/emborg
starts at: 2021-09-14T13:04:50.735911+02:00
ends at: 2021-09-14T13:04:56.335699+02:00
elapsed = 0:00:05.599788
Pruning archives ...
Using existing BORG_PASSPHRASE.
Borg-related environment variables: {
'BORG_PASSPHRASE': '<redacted>',
'BORG_DISPLAY_PASSPHRASE': 'no',
}
running:
borg prune \
--stats \
--keep-within 1d \
--keep-hourly 48 \
--keep-daily 14 \
--keep-weekly 8 \
--keep-monthly 12 \
--keep-yearly 1 \
--remote-ratelimit 2000 \
--prefix raspberrypi4- \
xxx:/home/xxx/borg_backups/raspberrypi4-root-docker
running in: /root/.config/emborg
starts at: 2021-09-14T13:04:56.339941+02:00
ends at: 2021-09-14T13:04:59.367321+02:00
elapsed = 0:00:03.027380
Borg stderr:
------------------------------------------------------------------------------
Original size Compressed size Deduplicated size
Deleted data: 0 B 0 B 0 B
All archives: 721.32 MB 380.92 MB 142.93 MB
Unique chunks Total chunks
Chunk index: 5276 29547
------------------------------------------------------------------------------
Unsetting BORG_PASSPHRASE.
reading: /root/.config/emborg/settings
emborg: terminates with status 0 on Tuesday, 14 September 2021 at 1:04:59 PM CEST.
Note that I have redacted some strings (with xxx
) and some of the ids.
I am at a complete loss. What you are seeing seems impossible. The settings command prints the value of every variable found in the settings files, so if it is in the file we should see in the output of the settings command. Is it possible that you are looking at the wrong file? I noticed that when you showed the contents of docker file the directory was given as ~/.config/emborg, but when you showed the contents of the settings file the directory was listed as /home/pi/.config/emborg. I think /home/pi is the default user's home directory, not root's. I believe root's home directory is /root.
You are very observant!!!
I was at a complete loss, too, and I have spent quite some time trying to figure this one out!
Indeed, the settings file I was editing was of the pi
user and not of the root
user. My bad for not cd
ing to the root
's .config
folder when I was sudo su
Sorry, for bothering you with this, but I was getting crazy!
Thank you so much!
I have the following
settings
:When I run
emborg create
, my docker service is not stopped while the backup takes place (I checked from another terminal). I assume therun_after_backup
is not run neither.Also, when I
emborg settings
I see:Same issue with the
healthchecks_uuid
config. There is no ping taking place!emborg is run as the
root
user (so I can read the root owned docker volumes)What am I doing wrong and why does emborg does not "see" my settings?