Koozali.org: home of the SME Server

Backup broken

Offline Peasant

  • *
  • 143
  • +2/-0
Backup broken
« on: August 05, 2019, 12:31:52 PM »
I've hit a problem with the built in backup with DAR. To cut a long story short, I had to add /etc/dehydrated to my backup, and did the following:
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf
nano -w /etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf/41go-into

In the 41go-into file, I added the following line:
Code: [Select]
--include  etc/dehydrated
Then:
Code: [Select]
expand-template /etc/dar/DailyBackup.dcf
I ran a backup (which was an incremental), and /etc/dehydrated was in it.

However, when I now run a full backup, only a small portion of my files are being backed up (usually the backup is around 157GB, but it is now 202MB). Backup says it is completing fine. If I run verify backup from the server-manager it tells me that the backup file was incomplete.

Two questions, is there a log file I can view somewhere, and can I 'undo' what I did to see if I can get it working again.

Thanks.

Jim

Offline Peasant

  • *
  • 143
  • +2/-0
Re: Backup broken
« Reply #1 on: August 05, 2019, 04:52:45 PM »
Doh!!

Just for fun I tried running a backup using the exact instructions that are in the wiki - ie to add /opt to the backup, and so far it seems to be running (previously I got a message within a minute to say the backup had completed).

So I then went and had a look at /etc/dehydrated and saw it was a directory, not a file. The code I should have put in the file 41go-into is
Code: [Select]
--go-into etc/dehydrated
Once this backup has run I'll change the code and try it again.
Jim

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Backup broken
« Reply #2 on: August 06, 2019, 02:09:15 PM »
Let us know what happens - we can mod the wiki if needs be.

We probably ought to automate adding the dehydrated certs to backups I guess.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Peasant

  • *
  • 143
  • +2/-0
Re: Backup broken
« Reply #3 on: August 06, 2019, 03:09:04 PM »
The backup completed successfully, and verifies from the server manager. The /etc/dehydrated directory tree is in the backup.
Jim

Offline Peasant

  • *
  • 143
  • +2/-0
Re: Backup broken
« Reply #4 on: August 06, 2019, 03:19:46 PM »
Let us know what happens - we can mod the wiki if needs be.


There are two things that have tripped me up in my adventures with letsencrypt. Firstly, although the letsencrypt wiki says I should add the /etc/dehydrated tree to the buit in backup there should perhaps also be a warning that if you don't do this, then when you restore to a new server httpd will complain, and you will have a server you cannot boot into.
Secondly, the letsencrypt wiki gives instructions for affa, but only a link for the built in backup. My mistake was I did not realise that /etc/letsencrypt was a directory tree, and I thought it was a file. I therefore used --include instead of --go-into. It might be worth specifying the code to put into the 41go-into file talked about in the backup with DAR instructions.

Apart from these small glitches I have got on fine. And I've learned a bit more about SME Server in the process of sorting them out, which is all the better :-)

Jim