#+TITLE: Backup Strategy #+SETUPFILE: ./setup/org-setup-file.org * Laptop Backup ** =Cloud= directory: =syncthing= Backup using =syncthing= on the =homelab=. ** =home= directory: =restic= =restic-backup= systemd service ([[file:systemd.org::*=restic-backup= - Backup Home Directory][here]]). It backups all the home directory, except for the =Cloud= directory (taken care by =syncthing=). This is in the =homelab= in =/srv/storage/Backups/esrf-laptop=. ** How to access backed up data ? =restic mount ~/mnt/backup/= Then go to =~/mnt/backup/snapshots=, and look for the wanted files. * Homelab Backup ** Backup Strategy The following directories are backup on the =Odroid HC4= machine: - =/home/thomas= that mainly contains the *docker configuration* - =Users= that contains the Cloud of all users - =Cloud= that contains my own cloud - =Music= that contains all the music library What is *not* backed up: - Most of multimedia content: =Animes=, =Books=, =Conferences=, =Documentaries=, =Games=, =Scans=, =StandUp=, =LiveMusic=, =Movies=, =Trainings=, =TVShows= - The =Downloads= directory ** How to access backed up data ? First, the =Odroid HC4= server needs to be powered on. To list backups: #+begin_src bash :dir /ssh:thomas@homelab:/ :results output replace docker exec restic-hc4 restic snapshots #+end_src Force backup of folder: #+begin_src bash :dir /ssh:thomas@homelab:/ :results output replace docker exec restic-hc4 restic backup /data/documents/manuals #+end_src Find the path to the file within the snapshot: #+begin_src bash :dir /ssh:thomas@homelab:/ :results output replace docker exec restic-hc4 restic find file_name #+end_src Find files only for a specific snapshot: #+begin_src bash :dir /ssh:thomas@homelab:/ :results output replace docker exec restic-hc4 restic find -s latest file_name #+end_src Restore files/folders (replace file/folders): #+begin_src bash :dir /ssh:thomas@homelab:/ :results output replace docker exec restic-hc4 restic restore --include /data/documents/manuals --target / 088e31a4 #+end_src You can use =latest= instead of the ID. If indeed, we want to make a copy of the file, we can use the backup folder #+begin_src bash :dir /ssh:thomas@homelab:/ :results output replace docker exec restic-hc4 restic restore --include /data/documents/manuals --target /backup 088e31a4 #+end_src * TODO [#C] Android backup https://www.plop.at/en/lineageos.html