- openHABian 3.3.0 on rPi4 4GB
I have migrated my items, groups, rules, etc. from OH2 to OH3.
after some 60 hours of work, I though it is time to set-up a backup.
I picked option:
50 | Backup/Restore Manage backups and restore your system ►
then
52 | Amanda System Backup Set up Amanda to comprehensively backup your complete openHABian box
-
picked the NAS option; which works, have used it with rsync before; in fstab and mounted; backup user can write to it.
-
chose 50,000 (no comma) for 50GB based on 16GB SD card
-
and get this error:
-
after hitting OK I got the menu… and exited out.
This was terminal output:
sudo openhabian-config
[sudo] password for openhabian:
2022-11-26_13:41:57_AEST [openHABian] Checking for root privileges... OK
2022-11-26_13:41:57_AEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2022-11-26_13:41:57_AEST [openHABian] openHABian configuration tool version: [openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)
2022-11-26_13:41:57_AEST [openHABian] Checking for changes in origin branch openHAB3... OK
2022-11-26_13:42:00_AEST [openHABian] Switching to branch openHAB3... OK
2022-11-26_13:42:00_AEST [openHABian] Adding slightly tuned bash configuration files to system... OK
2022-11-26_13:42:35_AEST [openHABian] Updating Linux package information... OK
2022-11-26_13:42:35_AEST [openHABian] Beginning setup of the Amanda backup system... OK
2022-11-26_13:43:08_AEST [openHABian] Configuring Amanda backup system prerequisites... OK
2022-11-26_13:43:09_AEST [openHABian] Installing Amanda backup system... OK
2022-11-26_13:44:40_AEST [openHABian] Installing MTA required packages (mailutils, exim4, dnsutils)... OK
2022-11-26_13:45:29_AEST [openHABian] Setting up Mail Transfer Agent ... 2022-11-26_13:51:22_AEST [openHABian] Creating MTA config... OK
2022-11-26_13:51:22_AEST [openHABian] Adding to email to system accounts... OK
2022-11-26_13:54:00_AEST [openHABian] Creating Amanda filesystem... host: '' is not in legal name syntax (unexpected end of input)
FAILED (chown)
2022-11-26_13:56:11_AEST [openHABian] Checking for default openHABian username:password combination... OK
2022-11-26_13:56:11_AEST [openHABian] We hope you got what you came for! See you again soon ;)
Since then I re-ran the config, which is now faster: user name, password, email: root; NAS: /media/SynologyBackup, 50000… boom = error.
From what I can see, /etc/amanda/amanda.conf
was not created.
Amanda seems to have installed:
dpkg -l | grep amanda
ii amanda-client 1:3.5.1-7 armhf Advanced Maryland Automatic Network Disk Archiver (Client)
ii amanda-common 1:3.5.1-7 armhf Advanced Maryland Automatic Network Disk Archiver (Libs)
ii amanda-server 1:3.5.1-7 armhf Advanced Maryland Automatic Network Disk Archiver (Server)
Any ideas?
Update:
I set the /etc/openhabian.conf
to debug=maximum
.
… going through the 1,000 lines it created in the terminal, I see:
$ chown --recursive backup:backup /media/SynologyBackup
+ chown --recursive backup:backup /media/SynologyBackup
chown: changing ownership of '/media/SynologyBackup/20221119-0800_backup.tar.gz': Operation not permitted
chown: changing ownership of '/media/SynologyBackup': Operation not permitted
+ return 1
+ echo 'FAILED (chown)'
FAILED (chown)
+ return 1
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n "50 | Backup/Restore"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.' 14 80
So, it could not change the owner on the NAS; fair enough.
I am going to use the attached USB SD card and change the Amanda config…
Set-up went through; now updating the config…
Will report back.
Update 2:
Even the install on the USB SD card had a problem; it reported:
expected integer in line 7
Looking at the conf file:
[15:55:57] root@openhabian:/etc/amanda/openhab-dir# cat amanda.conf
org "openHABian openhab-dir" # Organization name for reports
mailto "root@openhabian" # Email address to receive reports
dumpuser "backup" # User to run dumps under
netusage 90000 Kbps # Bandwidth limit, 90M
dumpcycle 7 # do a full dump once a week
runspercycle 7 # Run 7 times within dumpcycle i.e. each day
tapecycle tapes # Dump to this number of different tapes during the cycle
runtapes 8 # Number of virtual containers to use at most per backup run
tpchanger "chg-disk:/media/SynologyBackup/slots" # The tape-changer glue script
taper-parallel-write 2
This line has no integer:
tapecycle tapes # Dump to this number ...
I changed it to:
tapecycle 10 # Dump to this number ...
The drive links also needed changing:
[2022-11-26 16:05] openhabian@openhabian /etc $
la /media/temp/slots/
total 8.0K
drwxrwxr-x 2 backup backup 4.0K Nov 26 15:40 ./
drwxrwxrwt 5 backup backup 4.0K Nov 26 16:04 ../
lrwxrwxrwx 1 backup backup 17 Nov 26 15:40 drive0 -> /media/temp/slots/
lrwxrwxrwx 1 backup backup 17 Nov 26 15:40 drive1 -> /media/temp/slots/
sudo rm drive0
sudo rm drive1
sudo ln -s /media/SynologyBackup/slots/ drive0
sudo ln -s /media/SynologyBackup/slots/ drive1
sudo chown -h backup:backup drive0
sudo chown -h backup:backup drive1
# [2022-11-26 16:36] openhabian@openhabian /media/temp/slots $
la
total 8.0K
drwxrwxr-x 2 backup backup 4.0K Nov 26 16:34 ./
drwxrwxrwt 5 backup backup 4.0K Nov 26 16:04 ../
lrwxrwxrwx 1 backup backup 27 Nov 26 16:34 drive0 -> /media/SynologyBackup/slots/
lrwxrwxrwx 1 backup backup 27 Nov 26 16:34 drive1 -> /media/SynologyBackup/slots/
created the slots directories with:
for i in 1 2 3 4 5 6 7 8 9 10; do mkdir -p slot$i; done
# [2022-11-26 17:10] openhabian@openhabian /media/temp/slots $
sudo su - backup
[17:10:25] backup@openhabian:~$ amtape openhab-dir show
scanning all 10 slots in changer:
slot 1: unlabeled volume
slot 2: unlabeled volume
slot 3: unlabeled volume
slot 4: unlabeled volume
slot 5: unlabeled volume
slot 6: unlabeled volume
slot 7: unlabeled volume
slot 8: unlabeled volume
slot 9: unlabeled volume
slot 10: unlabeled volume
[17:15:51] backup@openhabian:~$ amcheck openhab-dir
Amanda Tape Server Host Check
-----------------------------
slot 2: contains an empty volume
Will write label 'openhab-dir-02' to new volume in slot 2.
NOTE: skipping tape-writable test
NOTE: info dir '/var/lib/amanda/openhab-dir/curinfo/openhabian/_boot' does not exist
it will be created on the next run
NOTE: index dir '/var/lib/amanda/openhab-dir/index/openhabian/_boot' does not exist
it will be created on the next run
Server check took 0.681 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 2.853 seconds. 0 problems found.
(brought to you by Amanda 3.5.1)
[17:16:09] backup@openhabian:~$ amreport openhab-dir
nothing to report on!
So far so good.
However, the backup I tried failed:
[17:18:02] backup@openhabian:~$ amdump openhab-dir
[17:18:56] backup@openhabian:~$ amreport openhab-dir
Hostname: openhabian
Org : openHABian openhab-dir
Config : openhab-dir
Date : November 26, 2022
These dumps were to tape openhab-dir-01.
The next 15 tapes Amanda expects to use are: 9 new tapes, openhab-dir-01, 5 new tapes.
FAILURE DUMP SUMMARY:
openhabian /boot lev 0 FAILED [can't dump in non degraded mode]
openhabian /var/lib/openhab lev 0 FAILED [can't dump in non degraded mode]
openhabian /var/lib/openhab lev 0 FAILED [state read: recv error: shm_ring is cancelled]
STATISTICS:
Total Full Incr. Level:#
-------- -------- -------- --------
Estimate Time (hrs:min) 0:00
Run Time (hrs:min) 0:00
Dump Time (hrs:min) 0:00 0:00 0:00
Output Size (meg) 3.0 3.0 0.0
Original Size (meg) 6.8 6.8 0.0
Avg Compressed Size (%) 44.4 44.4 --
DLEs Dumped 1 1 0
Avg Dump Rate (k/s) 1586.1 1586.1 --
Tape Time (hrs:min) 0:00 0:00 0:00
Tape Size (meg) 3.0 3.0 0.0
Tape Used (%) 0.1 0.1 0.0
DLEs Taped 2 2 0
Parts Taped 2 2 0
Avg Tp Write Rate (k/s) 1034.7 1034.7 --
USAGE BY TAPE:
Label Time Size % DLEs Parts
openhab-dir-01 0:00 8736K 0.4 2 2
FAILED DUMP DETAILS:
/-- openhabian /var/lib/openhab lev 0 FAILED [state read: recv error: shm_ring is cancelled]
sendbackup: info BACKUP=APPLICATION
sendbackup: info APPLICATION=amgtar
sendbackup: info RECOVER_CMD=/bin/gzip -dc |/usr/lib/amanda/application/amgtar restore [./file-to-restore]+
sendbackup: info COMPRESS_SUFFIX=.gz
sendbackup: info end
\--------
NOTES:
planner: Adding new disk openhabian:/boot.
planner: Adding new disk openhabian:/etc.
planner: Adding new disk openhabian:/var/lib/openhab.
planner: WARNING: no history available for openhabian:/var/lib/openhab; guessing that size will be 500000 KB
planner: WARNING: no history available for openhabian:/etc; guessing that size will be 500000 KB
planner: WARNING: no history available for openhabian:/boot; guessing that size will be 500000 KB
taper: Slot 1 without label can be labeled
taper: tape openhab-dir-01 kb 3104 fm 2 [OK]
big estimate: openhabian /etc 0
est: 500032K out 3104K
DUMP SUMMARY:
DUMPER STATS TAPER STATS
HOSTNAME DISK L ORIG-KB OUT-KB COMP% MMM:SS KB/s MMM:SS KB/s
-------------------------- ---------------------- -------------- -------------
openhabian /boot FAILED
openhabian /etc 0 6990 3104 44.4 0:02 1586.0 0:01 3104.0
(brought to you by Amanda version 3.5.1)
Well, now I am at the end of my wits.