nixos-rebuild switch --build-host root@mandalore --target-host root@mandalore --flake ".#mandalore"
ssh root@<IP> -p 2222
Don't forget to specify root as username when connecting to the initrd ssh session!
# start
systemctl start restic-backups-fullbackup
# view status
systemctl status restic-backups-fullbackup
# view snapshots
restic-fullbackup snapshots
# browse snapshots
restic-fullbackup ls latest /var/lib/
# restore
/run/current-system/sw/bin/restic-fullbackup restore --target / latest
# IMPORTANT: the mount/unmount pkgs are only available for the root user
# mount the HDD backup drive
hdd-mount
# starting the HDD backup
systemctl start restic-backups-hdd
# showing the status of the HDD backup
systemctl status restic-backups-hdd
# unmount the HDD backup drive
hdd-unmount
# showing the snapshots of the HDD backup
restic-hdd snapshots
# restoring the backup from the HDD
restic-hdd restore latest --target /
To view the logs of the podman containers specified in the nix config, use the following command:
# show containers
sudo podman ps -a
# show logs for container
sudo podman logs -f <CONTAINER_ID>
# export
/var/lib/paperless/data/paperless-manage document_exporter /home/ruben/paperless-export-001
# create a repo on the server
sudo -u git bash -c "git init --bare ~/myproject.git"
# then you can use it via the following url
[email protected]:myproject.git
- In case of systemd temp files and directories not created properly when testing backups, run
sudo systemd-tmpfiles --create
on the server.
# port forward localhost:3000 to mandalore:2020
ssh mandalore -L 3000:localhost:2020 -fN