Backing Up Home Assistant Container to Google Drive with Duplicati

  Рет қаралды 30,809

Home Automation Guy

Home Automation Guy

2 жыл бұрын

How do you back up your Home Assistant, and other Docker Containers to Google Cloud when there is no Supervisor? I show you how to set up Duplicati to automatically back up all your Docker containers and configuration files to Google Could, Dropbox, OneDrive or Box on a daily basis. Restoring data is a breeze too!
Duplicati: www.duplicati.com/

Пікірлер: 74
@donnyf12
@donnyf12 2 жыл бұрын
This is great. I've been running a custom script on bare metal to copy my config to dropbox. I've been looking for a better solution like this. It also illustrates, to me, the biggest advantage of using supervisor in that it makes it really easy to set things like this up. Looking for alternatives to some of these is not the easiest. I've never heard of Duplicati until today and I thank you for your research and the set up video. I can now expand my backups to include other config files from my other docker containers.
@HomeAutomationGuy
@HomeAutomationGuy 2 жыл бұрын
The supervisor is awesome, and I recommend it to 95% of people looking to use Home Assistant. Some of us just like to push the boundaries a bit more and be able to choose different options of software to use in our smart homes that don't currently come as Add-Ons.
@JamesTenniswood
@JamesTenniswood 2 жыл бұрын
Loving duplicati, I switched my whole backup system to use it. So much easier to understand than restic
@benjaminolds
@benjaminolds Жыл бұрын
2 days after I saw this and set it up my SSD started acting up. This saved me SO MUCH WORK! Thank you much H.A.G.!
@henningklages861
@henningklages861 10 ай бұрын
Great video! As backup retention I suggest "smart backup retention". Sometimes it is good to have an "old" backup.
@jpegfr
@jpegfr Жыл бұрын
Thank you for this summary video on Duplicati. It allowed me to discover the tool and to add it to my tooling. I use Borg but indeed Duplicati brings a "User frendly" side much more pleasant. On the other hand, as I configured my Stack to use mariaDB and influxDB databases, it becomes necessary to think of making a dump of the databases to avoid data corruptions. It is thus necessary to stop correctly a part of the stack. This can be automated by scripts, but it must be launched before the backup task. You will then have to go back to the state before the backup by restarting the stopped services. Duplicati is able to launch scripts before and after the execution of a backup task. I invite you to look at the --run-script-before and --run-script-after options.
@michaelschwemmle7886
@michaelschwemmle7886 Жыл бұрын
Hi Alan, first of all I have to thank you for your fantastic KZbin videos. A week ago I only knew that Docker existed and had no idea what to do with it. My Home Assistant installation was running on an old Raspberry PI3+ with just 2GB of RAM. You can imagine how often I had to reboot the system. Today, everything runs on an old I3 Vaio notebook. I was able to integrate all the necessary components with Docker Compose. I have integrated all my Aquara components with zigbee2mqttt and the notebook switches itself on or off, depending on the state of charge of the battery. Now I'll get to work on installing Duplicati. Maybe you have a tip for me on how to integrate the new Aquara cube T1 plus into Home Assistant. This device is not yet supported by default. Man, that's really great what you're doing on your channel. Thanks again. All the best for you and continue to have fun and success
@peterbacon6571
@peterbacon6571 3 ай бұрын
Another great video that I followed to setup backups of my containers. Being new to containers and Home Assistant I am finding your videos a great help. The one problem I did have was that I didn't already have a \source directory so got stuck on the step trying to find the expandable 'source' directory. Sorted by creating the directory .
@HomeAutomationGuy
@HomeAutomationGuy 3 ай бұрын
Glad you got it working!
@drbyte2009
@drbyte2009 2 жыл бұрын
I love to watch your video's. ! I am setting up your tutorials on an old laptop to see whats happening :-)
@Tntdruid
@Tntdruid 2 жыл бұрын
This is very nice, looks like my new backup solution. Thanks for making this nice guide 🙂
@terenceyung
@terenceyung 2 жыл бұрын
learnt another nice tool to implement in my new HA container stack. thank you.
@lucapesce3335
@lucapesce3335 Жыл бұрын
huge step ahead in my smarthome setup, thank you
@HomeAutomationGuy
@HomeAutomationGuy 11 ай бұрын
You're welcome!
@schurik198
@schurik198 2 жыл бұрын
Great tutorials. Thank you very much.👍
@ScottMackey
@ScottMackey 2 жыл бұрын
Hi, another amazing helpful video and very well put across, so easy to understand and follow. Don't know if it's helpful but I was going to do something similar but using Git, which would give something very similar to Duplicati in terms a way of recovery. It's a more geeky way to do it but also a bit more powerful in the way of version control. Anyway thanks again!
@AA-dg4oo
@AA-dg4oo 2 жыл бұрын
Awesome. Super helpful videos.
@AndreasLenze
@AndreasLenze 2 жыл бұрын
Brilliant, thank you! 👍
@fredandre3415
@fredandre3415 2 жыл бұрын
Great video thanks a lot!
@huugbischoff8929
@huugbischoff8929 2 жыл бұрын
Great video! With Home assistant starting to use the database for more persistent storage (energy dashboard) I would love to understand how to properly backup the database too. Using Duplicati I corrupted my database a couple of times and I had to exclude it from the backup to avoid this from happening again... would love to hear a proper solution for including the db in the backup while avoiding the risk of corrupting it!
@henningklages861
@henningklages861 2 жыл бұрын
In general, there a 2 options. One is to stop the container gracefull BEFORE and start it afterwards, the other is to use the database build in backup tool (if there is one :-) and backup the backup.
@JulienTant
@JulienTant Жыл бұрын
Hi! Great content! I would consider using "static" docker image version in my docker-compose file when using automatic backups. Doing so, when I need to restore a backup, including the docker-compose file, I know I'm running the files that matches the correct version. Then I could rely on a home-assistant automation to know if I run the latest version or not.
@HomeAutomationGuy
@HomeAutomationGuy Жыл бұрын
Good catch! Great suggestion
@danninoash
@danninoash 10 ай бұрын
Hey, thank for the great video, first! in the "Source data" step, I cannot find docker folders and specifically the HA one. what do I do? it can take me days to search it :\ my "source" folder has nothing under it. Thanks!
@jeffrey3205
@jeffrey3205 Жыл бұрын
can I use a backup to install on a different house like my sister's house just delete my IP address and other stuff that links to my personal setup along with my devices that she doesn't have?
@PeterBlandford
@PeterBlandford 10 ай бұрын
Thanks for the informative video. I have noticed a problem using duplicati to backup home assistant: I find the home-assistant_v2.db database file is often corrupted during trhe baskcup process. I assume this is because the file is copied and written to simulataneously. I managed to restore an older database file but lost a few days of data (the energy data is what I like to keep and compare year to year). Have you noticed this or found a solution? I am stopping HA before the backup once a week but that is not an optimal solution.
@phatpizza610
@phatpizza610 2 жыл бұрын
Thx heaps for this, I had to turn off "Prevent cross-site tracking" in Safari to get the to work otherwise it kept saying login failed, guess its something to do with cookies
@crc-error-7968
@crc-error-7968 Жыл бұрын
Thanks again Alan! if you want to avoid file access problems you can set environment: # - PUID=1000 # - PGID=1000 - PUID=0 - PGID=0 in your docker-compose.yml, this will give to duplicati the root access. To me it worked (I had a lot of warning on portainer), but I have not tried to restore to see what happens and also I am not sure if, give to a container the root privileges, can compromise the system security Ciao Roberto
@user-uf9ke9tm2w
@user-uf9ke9tm2w Жыл бұрын
thanks, worked for me too. i first tried chown ing the /opt to pi user but was stil getting some access warning, this worked like a charm
@ic4roswings
@ic4roswings Жыл бұрын
thanks you save me like a metric tone of research
@ChadCroft
@ChadCroft Жыл бұрын
Thank you for this.
@TDCroPower
@TDCroPower 6 ай бұрын
don't use the root user! Better use the command... getent passwd | grep 1000 ... on your host to check which user you will use with the id 1000. If its not exist, create it with the command... useradd -u 1000 YourUserName ... and give the user the needed access to your filesystem/directory !
@andrescalapt_
@andrescalapt_ Жыл бұрын
Hi Alan, thanks for the video. I'm not getting my folder duplication, is missing something? volumes: - /opt/duplicati/config:/config - /opt:/source And Im getting an error connecting with the drive :( Thks
@gerardoconnor1261
@gerardoconnor1261 2 жыл бұрын
fantastic! Thanks for a great video. As for backups, I am not clear where lovelace sores its config. I have to assume it's is the database. Is there a way to rebuild a homeassisant instance with just a handful of files? If so, which ones are needed?
@HomeAutomationGuy
@HomeAutomationGuy 2 жыл бұрын
I believe the lovelace config is stored in the .storage folder under your Home Assistant directory.
@tom-vv2sb
@tom-vv2sb 2 ай бұрын
hi Alan, I want to use my rpi to backup my server. My backups will be my opt folder and a smb share with photos. Is it smart to install duplicati on my rpi to keep the workload of my server? This will be the main purpose of running the rpi. The rpi will be at another place and connected through wireguard to my home network. Thx!
@havkacik
@havkacik Жыл бұрын
This is all ovewsome but what about those locked database files? Does it mean that it's impossible to backup full Home Assistant configuration while in use? So effectively, some automation rules or device configurations might not be backed up?
@tobid9288
@tobid9288 2 жыл бұрын
Thank you for this great video. I did't know duplicate until now. During my first testing I got a lot of file access error warnings. Is this because the containers are still running and accessing some of the files? For example some portainer file are in the list or my influxdb. Do you have also warnings during your backup?
@HomeAutomationGuy
@HomeAutomationGuy 2 жыл бұрын
I do, but I ignore most of them. I'm not as worried about backing up the database history of things, I'm more interested in backing up my configuration files etc. Ideally we would shut down all our containers before we back them up to prevent these warnings.
@sapumalkalutota
@sapumalkalutota 5 ай бұрын
Hey mate! Firstly, great content. Been following your docker installation series and I was wondering whether you considered other options such as Restic, Kopia, Rclone, Borg before choosing Duplicati? Everywhere I look, I hear bad news about Duplicati so I'm a bit worried about this one
@HomeAutomationGuy
@HomeAutomationGuy 5 ай бұрын
No, I didn't look at those other ones in any detail I'm afraid.
@sapumalkalutota
@sapumalkalutota 5 ай бұрын
Okay, thanks! @@HomeAutomationGuy
@irtibatkisileri222
@irtibatkisileri222 Жыл бұрын
Thanks for tutorial. I am no expert just asking this question based on hearsay Would this method corrupt the files of active and running containers. I have heard if a file is backed up while it was being written/changed it can be damaged.
@HomeAutomationGuy
@HomeAutomationGuy Жыл бұрын
Yeh, that is a risk on some types of containers or applications. I personally haven't had this happen with any of the ones I am using.
@substandard649
@substandard649 2 жыл бұрын
I've been following your HA as a container video and have everything working great - thanks! backup was the missing link and I went ahead and rolled my own using borg directly from the host OS. I've been shutting down HA, MQQT and zigbee2mqqt pre backup to avoid corrupting their databases. Does your solution avoid having to do this?
@HomeAutomationGuy
@HomeAutomationGuy 2 жыл бұрын
It doesn't avoid doing this. I personally have never shut down my containers and have yet to corrupt any databases, but that doesn't mean it's a good idea to follow my lead!
@substandard649
@substandard649 2 жыл бұрын
@@HomeAutomationGuy I figured out it's possible to dump the db's with a little effort but it's so much easier to run a bash script on the host OS with cron that stops dockers, does that backup (borg for me), and restarts the docker. After the initial backup this only involves 60 seconds of downtime.
@salernod2812
@salernod2812 9 ай бұрын
I see there is the option to run a script before and after doing the back up. it would be great to stop HA container before doing the backup to avoid any DB corruption.
@HomeAutomationGuy
@HomeAutomationGuy 9 ай бұрын
That's a good idea!
@stjonal
@stjonal 5 ай бұрын
Wait, i think im missing a video between you explaining the difference between explaining the difference between HAOS or the docker install and this video. You already installed docker and set up the VSC environement. Where is that video?
@HomeAutomationGuy
@HomeAutomationGuy 5 ай бұрын
Check the playlist
@MrSupersidewinder
@MrSupersidewinder 2 жыл бұрын
Will this solution do its backups to a local nas??? I really want everything possible within my own network... And should we script to stop all Docker containers that would be actively writing to databases, then restart them after writing backups???
@HomeAutomationGuy
@HomeAutomationGuy 2 жыл бұрын
Yep, it sure can. As long as the NAS is accessible from your Duplicati Docker Container it will be able to use it as a target. You can use SCP, FTP or Samba to write to it. I am not sure on the best practises for stopping the docker containers. I personally don't do it, and I've not had problems yet, but I've heard some people having issues with sqlite databases.
@RocketBoom1966
@RocketBoom1966 2 жыл бұрын
I have mapped my volumes as per Alan's example, however when I browse the 'Source Data' folder on the Duplicati page, I see nothing. I can only browse directories on the host I am using to view the Duplicati page. Any clues?
@GeoffAumaugher
@GeoffAumaugher 2 жыл бұрын
You have to look for the source folder under the computer tree, not the separate folder that shows below it.
@ChadCroft
@ChadCroft Жыл бұрын
@@GeoffAumaugher you are a saviour! I did the same thing as the guy above you! thanks!
@watchedsvideo
@watchedsvideo 10 ай бұрын
Why do you create a docker compose file, start it up from the command line, then go into Portainer to check that it's running, when you manage all your compose scripts as Stacks in Portainer? Is it because it 'breaks' the good thing you've got going with VS Code?
@HomeAutomationGuy
@HomeAutomationGuy 10 ай бұрын
I have Portainer running in a container, and it seemed a little dicey and counter intuitive to me to manage my containers from a container.... If that makes sense. It would probably be fine to do it all in Portainer, it just seemed scary to me 🤷🏻‍♂️🤣
@barygol
@barygol 7 ай бұрын
Can i use it to do the back up to my NAS ?
@HomeAutomationGuy
@HomeAutomationGuy 7 ай бұрын
Yep
@xoarex
@xoarex Жыл бұрын
I am not able to make duplicati run, when I look at the logs I see the following: s6-svscan: warning: unable to iopause: Operation not permitted s6-svscan: warning: executing into .s6-svscan/crash s6-svscan crashed. Killing everything and exiting. s6-supervise s6-linux-init-shutdownd: fatal: unable to iopause: Operation not permitted Also, the duplicati folder shows empty
@xoarex
@xoarex Жыл бұрын
I've solved this by setting: image: duplicati/duplicati:latest
@stuartforrest
@stuartforrest 3 ай бұрын
Nope. I get the same error when restoring. Yesterday it was with Debian 12 but today I setup an Ubuntu server and again get exactly the same error. Anyone know what I am doing wrong. I am trying to restore a single file with a timestamp to the original location 2024-03-28 13:50:52 +00 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: "/source/homeassistant/config/configuration.yaml", message: Access to the path '/source/homeassistant/config/configuration.yaml' is denied. 2024-03-28 13:50:52 +00 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-NoFilesRestored]: Restore completed without errors but no files were restored
@Eratzer
@Eratzer Жыл бұрын
Of course, panel don't work with ssl. That would be too ez...
@HomeAutomationGuy
@HomeAutomationGuy Жыл бұрын
Yeh, that's one drawback unfortunately.
@Eratzer
@Eratzer Жыл бұрын
@@HomeAutomationGuy Duplicati is awesome but Oauth seems to stop working from time to time. Another thing i couldn't integrate with docker is deluge. Impossible to get the autoadd plugin working...
@SuppressWarning
@SuppressWarning 2 жыл бұрын
As italian please I beg you to pronounce "duplicati" not "duplicadi"😅
@HomeAutomationGuy
@HomeAutomationGuy 2 жыл бұрын
I'm sorry, I meant no offence and will aim to do better! 😥🤣
@SuppressWarning
@SuppressWarning 2 жыл бұрын
@@HomeAutomationGuy ahaha i was joking, man love your channel keep it up 🎉
@andrewmcnulty0
@andrewmcnulty0 Жыл бұрын
Warning-Duplicati.Library.Main.Operation.Backup.FileBlockProcessor.FileEntry-PathProcessingFailed]: Failed to process path: /source/homeassistant/config/.storage/auth any idea what this error is about?
@MyHeap
@MyHeap 2 жыл бұрын
Again, a great series and thank you for doing them. Although I have gone a little out of order. Finally set up a space of my TrueNAS server to backup to using FTP with duplicati. I installed duplicati and everything went without a hitch. There were warnings about access. So after I "chown -R /opt {myuser}" the /opt directory, I deleted the old backup config and the files. Next I recreated the backup config and run the backup to no errors or warnings. I done a restore the same as you, I didn't have any errors, but there was one warning that reads, "2022-06-23 16:08:06 -05 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-NoFilesRestored]: Restore completed without errors but no files were restored" Any ideas on this? [EDIT] as a test I renamed my docker-compose.yaml file to docker-compose.yaml.old and then done a restore of the docker-compose.yaml using the original location and overwrite option. The file _did_ restore. The option to use "save different versions with timestamp in file name" that it does not restore the file. Is this because there was no change in the file compared to the backup? [EDIT 2] Another test. I added some line feeds to the live docker-config.yaml file, the tried another restore using the option with the time stamp, and this time it saved. I guess Duplicati is smart enough not to restore a file that has never changed? May be something good to pass along to new users like me. Thanks again for all you fine videos! I appreciate them. I have never used home automation anything but your series is helping me to learn loads of stuff. Now that I have a couple of zigbee devices working under zigbee2mqtt, I think I will dig out my cheap Chinese IP camera and give your Frigate tuts a try. Joe
@HomeAutomationGuy
@HomeAutomationGuy 2 жыл бұрын
Thanks for the extra information and glad you're testing it all! Good luck with Frigate!
Living without add-ons on Home Assistant Container
14:33
Home Automation Guy
Рет қаралды 152 М.
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 51 МЛН
Despicable Me Fart Blaster
00:51
_vector_
Рет қаралды 25 МЛН
ESPHome room presence detection with Format-BLE-Tracker
15:15
Home Automation Guy
Рет қаралды 12 М.
Proxmox Storage | Mount Google Drive to Proxmox
10:46
syncbricks
Рет қаралды 9 М.
Docker Backup and Restore Made EASY with Restic
8:51
Jim's Garage
Рет қаралды 15 М.
The best and worst decisions I made for my smart home
17:03
Home Automation Guy
Рет қаралды 49 М.
The cloud is over-engineered and overpriced (no music)
14:39
Tom Delalande
Рет қаралды 506 М.
Never Lose Your Home Assistant Server AGAIN
9:49
Everything Smart Home
Рет қаралды 74 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 341 М.
Improve Zigbee network performance and stability with these 3 tips
11:41
Home Automation Guy
Рет қаралды 170 М.
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 420 М.
Always wear good shoes outside! ⚠️💀
0:20
scottsreality
Рет қаралды 11 МЛН
🤣ПОКУПАЕТ МАШИНУ У ДЕВУШКИ
0:35
MEXANIK_CHANNEL
Рет қаралды 7 МЛН
CAA Conversion kit at ZAHAL 🎯
0:14
Zahal Youtube
Рет қаралды 48 МЛН
宠爱天使的小丑。#天使 #小丑 #超人不会飞
0:20
超人不会飞
Рет қаралды 4,6 МЛН
20 июля 2024 г.
0:58
Моби Салон
Рет қаралды 3,3 МЛН