Questions about Amanda backup

Hi everyone

i have a few questions about Amanda backup

i have successfully set up the backup too my NAS using a NFS share all is fine there (I think)

the files selected in the backup are

html   items        rules    services  sounds  transform
icons  persistence  scripts  sitemaps  things
backups  cache  config  etc  gcal  jsondb  openhabcloud  persistence  tmp  uuid

are these folders alone enough too fully restore a completely crashed system if i needed too start from fresh?

my current backup solution backups openhab config files every night too a USB Stick

But i have too take the system offline too take a full sd card image from a different pc i would like amanda too replace this so i don’t need too take the system offline too take an image is this the RAW SD card backup if so how do i enable this now fully setup

You need to list the directories and partitions you want to backup in /etc/amanda/openhab-dir/disklist .
It would need to look like this

openhab         /etc/openhab2                           user-tar
openhab         /var/lib/openhab2                       user-tar
openhab         /dev/mmcblk0                            amraw

The last line will backup your SD card off a running system (no need to shut it down).
You can add any other directory there as well.

PS: re-read the README please, it’s all written in there.

1 Like

Hi Markus thanks for the reply

is this the exact thing needed i don’t know how to check partitions ect on linux?

i have also been reading through the docs for amanda when i set it up but the format you sent me is better thanks for that

here is my current disklist i added the part you recommended but don’t know how to check this stuff not that advanced of a linux user yet

openHABianPi  /etc/openhab2             user-tar
openHABianPi  /var/lib/openhab2         user-tar
openHABianPi  /dev/mmcblk0              amraw


Try this in shell. Will print errors if there’s an error in the disklist file:

[22:00:31] openhabian@openhabianpi:/var/log/amanda$ sudo su - backup
[22:00:39] backup@openhabianpi:~$  amcheck openhab-dir
Amanda Tape Server Host Check
Searching for label 'openhab-dir-009':found in slot 9: volume 'openhab-dir-009'
Will write to volume 'openhab-dir-009' in slot 9.
NOTE: skipping tape-writable test
Server check took 0.800 seconds

Amanda Backup Client Hosts Check
Client check: 1 host checked in 3.770 seconds.  0 problems found.

(brought to you by Amanda 3.3.9)
[22:00:46] backup@openhabianpi:~$

I could not run the backup manually after adding mmcblk0

so i had to wait until it was ran on its own

[20:44:00] backup@openHABianPi:/home/openhabian$ amcheck openhab-dir
Amanda Tape Server Host Check
slot 8: contains an empty volume
Will write label 'openHABian-openhab-dir-008' to new volume in slot 8.
NOTE: skipping tape-writable test
Server check took 0.988 seconds

Amanda Backup Client Hosts Check
Client check: 1 host checked in 3.779 seconds.  0 problems found.

(brought to you by Amanda 3.3.9)
[20:44:20] backup@openHABianPi:/home/openhabian$ amreport openhab-dir
Hostname: openHABianPi
Org     : openHABian openhab-dir
Config  : openhab-dir
Date    : October 7, 2018

These dumps were to tape openHABian-openhab-dir-007.
The next 10 tapes Amanda expects to use are: 8 new tapes, openHABian-openhab-dir                                                                                        -001, openHABian-openhab-dir-002.

                          Total       Full      Incr.   Level:#
                        --------   --------   --------  --------
Estimate Time (hrs:min)     0:12
Run Time (hrs:min)          0:35
Dump Time (hrs:min)         0:22       0:22       0:00
Output Size (meg)         3115.8     3110.6        5.2
Original Size (meg)      15198.7    15193.5        5.2
Avg Compressed Size (%)     20.5       20.5      100.0
DLEs Dumped                    3          1          2  1:2
Avg Dump Rate (k/s)       2370.1     2372.0     1613.4

Tape Time (hrs:min)         0:22       0:22       0:00
Tape Size (meg)           3115.8     3110.6        5.2
Tape Used (%)               93.5       93.3        0.2
DLEs Taped                     3          1          2  1:2
Parts Taped                    3          1          2  1:2
Avg Tp Write Rate (k/s)   2375.6     2373.5     4863.6

  Label                        Time         Size      %  DLEs Parts
  openHABian-openhab-dir-007   0:22     3190603k   93.5     3     3

  planner: Adding new disk openHABianPi:/dev/mmcblk0.
  planner: Last full dump of openHABianPi:/etc/openhab2 on tape openHABian-openh                                                                                        ab-dir-001 overwritten on this run.
  planner: Last full dump of openHABianPi:/var/lib/openhab2 on tape openHABian-o                                                                                        penhab-dir-004 overwritten in 1 run.
  taper: Slot 7 without label can be labeled
  taper: Slot 8 without label can be labeled
  taper: tape openHABian-openhab-dir-007 kb 3190603 fm 3 [OK]
  big estimate: openHABianPi /dev/mmcblk0 0
                  est: 7779104k    out 3185253k

                                                          DUMPER STATS   TAPER S                                                                                        TATS
HOSTNAME     DISK              L  ORIG-kB  OUT-kB  COMP%  MMM:SS   KB/s MMM:SS                                                                                           KB/s
-------------------------------- ----------------------- -------------- --------                                                                                        -----
openHABianPi /dev/mmcblk0      0 15558144 3185253   20.5   22:23 2372.0  22:22 2                                                                                        373.5
openHABianPi /etc/openhab2     1       20      20     --    0:01   17.0   0:00                                                                                          200.0
openHABianPi /var/lib/openhab2 1     5330    5330     --    0:02 2490.4   0:01 5                                                                                        330.0

(brought to you by Amanda version 3.3.9)
[20:44:46] backup@openHABianPi:/home/openhabian$

Hi again @mstormi

What would I need too add too backup the hard drive openhab is installed on I have recently moved my system from an RPI too a Ubuntu VM running on hyper-v so obviously there is no longer a mmcblk0 as there’s no longer an sd card in my setup

the device name of the / partition, sda or whatever that is on your system

1 Like

Thanks for that @mstormi i was under the impression it was sda but wasnt 100% sure

when changing directory to /dev and running ls i have a few sda , sda1 ,sda2

is sda the entire drive and sda1 & sda2 the partitions on the drive ?

You should not backup the whole disk but separately enter all partitions you want to backup

1 Like

Thanks for the clarification on that really appreciate it :slight_smile:

Super appreciate that too i was only going too add sda i will add them separately like you say might have saved me some future problems there :wink:

GNU nano 2.9.3            /etc/amanda/openhab-dir/disklist            Modified

openhabian  /etc/openhab2             user-tar
openhabian  /var/lib/openhab2         user-tar
openhabian  /dev/sda1                 comp-amraw
openhabian  /dev/sda2                 comp-amraw

Is comp-amraw right thats what mmcblk0 was using whatever the comp part means i know amraw is raw image

comp-* means to compress the backup

1 Like

Hi again @mstormi hoping for a quick tip

I used Hyper-V snapshot today too restore my system too an earlier state set it too the 28th this month and need too recover my items and rules running the commands too get into my backups it lists the backups for the date the 28th how do i change too todays backups the 31st i have forgotten the command and cant find a reference on how too do this

[22:53:09] sharpy@openhabian:/etc$ sudo bash
root@openhabian:/etc# amrecover openhab-dir
AMRECOVER Version 3.5.1. Contacting server on localhost ...
220 openhabian AMANDA index server (3.5.1) ready.
Setting restore date to today (2020-01-31)
200 Working date set to 2020-01-31.
200 Config set to openhab-dir.
200 Dump host set to openhabian.
Use the setdisk command to choose dump disk to recover
amrecover> listdisk
200- List of disk for host openhabian
201- /etc/openhab2
201- /var/lib/openhab2
201- /dev/sda1
201- /dev/sda2
200 List of disk for host openhabian
amrecover> setdisk /etc/openhab2
200 Disk set to /etc/openhab2.
amrecover> ls
2020-01-28-01-00-01 transform/
2020-01-28-01-00-01 things/
2020-01-28-01-00-01 sounds/
2020-01-28-01-00-01 sitemaps/
2020-01-28-01-00-01 services/
2020-01-28-01-00-01 scripts/
2020-01-28-01-00-01 rules/
2020-01-28-01-00-01 persistence/
2020-01-28-01-00-01 items/
2020-01-28-01-00-01 icons/
2020-01-28-01-00-01 html/
2020-01-28-01-00-01 .

it does say its set the dates too 31st but as you can see its listed backups for 28th but i definitely have copies stored for all dates not just the 28th


Oh come on. “?” will give you the list of commands.

1 Like

Thats something i didn’t know i will add it too my notes :slight_smile: will try and get it sorted now thank you

your right it does my bad but setting the date too the 31st still lists backups from the 28th