rationale Link to heading

  • do not send your phone backup to nonexistant privacy policies company
  • host on local truenas + webdav
  • using davx app for webdav + caldav/cardav
  • using https for the transport what else ?
  • using truenas webui for kiss

requirements Link to heading

  • a local truenas server 192.168.30.35
  • a lineageos phone that reach this server:port

warnings Link to heading

  • the seedvault is not a single/perfect solution at all !

you need a second simple backup solution (adb/syncthing/whatsoever) in case seedvault does shit while backup/recovering

adb seems to be a solid solution

reading this excellent blogpost can help

  • if you need to use a public facing webdav server ( not covered in this post )

it’s highly recommended to use caddy mothafuckin KISS stuff

truenas setup Link to heading

create a dataset called webdav Link to heading
install app webdav Link to heading
  • webdav

  • basic auth

  • username

  • passphrase

  • user and group

  • uid of webdav is 666

  • gid of webdav is 666

  • enable https

  • :30035

  • truenas defautl certificate (or create your own)

  • enable the share

  • share name thawebdav

  • hostpath /mnt/your/dataset/webdav

  • install/update

it could take long time before app is deployed via kubernetes refresh the app webui to check it out

check what webdav guid is it’s 666 don’t ask me why Link to heading

apply permission in your dataset as follows

  • root rwx rwx rwx

  • webdav rwx rwx rwx

  • others gofuckyourself

  • apply permission recuresively

  • save

restart the webdav app Link to heading
troubleshooting Link to heading

you can mount the webdav from your laptop

sudo mount.davfs 'https://192.168.30.35:30035' /mnt/thawebdav/

you can also reach it via cadaver

cadaver https://192.168.30.35:30035

lineageOS setup Link to heading

davx thing Link to heading
  • connect to your homenetwork to reach 192.168.30.35:30035
  • double check your firewall is not an issue

Install the davx app via fdroid

https://f-droid.org/packages/at.bitfire.davdroid/

  • skip the tips

  • in the main menu > tools > add a webdav mount

  • name : thawebdav

  • url: https://192.168.30.35:30035

  • username

  • passwod

  • add

if you have 302 error double check you have correct url

you should see it added to your mountpoint

seedvault thing Link to heading

In System > backup > seed vault setting

  • generate recovery code
  • backup tha code !
  • apply it
  • setup the destination as davx webdav
  • check all the box you want

you can add specific directories when checking backup files

wait for seedvault to do some backup then check if it’s in your webdav app

for some reasons you may need to fully restore seedvault before following the setup procedure

  • settings > Apps > display system apps > seedvault
  • delete cache and data
  • force stop
  • reconfigure seedvault from scratch

restore backup Link to heading

you can use this adb command from your laptop

adb shell am start-activity -a com.stevesoltys.seedvault.RESTORE_BACKUP

or this code on the phone

*#*#RESTORE#*#*

then hope it’ll go well !

ressources : Link to heading

https://www.truenas.com/docs/scale/scaletutorials/apps/

https://github.com/bitfireAT/davx5-ose/

https://manual.davx5.com/webdav_mounts.html

https://wiki.archlinux.org/title/WebDAV

https://github.com/seedvault-app/seedvault/wiki/FAQ

https://developer.android.com/guide/topics/data/backup

https://web.archive.org/web/20240316062736/https://iamtuna.org/2023-10-08/use-adb-backup-restore-local-data-2