Simple script to backup the software installation of the DAQ computer in the LEGENDLab at TUM using borgbackup.
(as root)
apt-get install borgbackupgenerate ssh key (and create user on server)
ssh-keygen -t ed25519 -C "user@legendlab"and generate ssh config
Host artemis
HostName AAA.BBB.CCC.DDD
port 22
user legendlab
IdentityFile ~/.ssh/legendlabPrepare script env.
chmod +x *.sh
mkdir logAdd a cron job to run the scripts once every two hours:
# m h dom mon dow command
0 */2 * * * /usr/bin/bash /home/legend/software/LEGENDLab-Backup/backup.sh
15 */2 * * * /usr/bin/bash /home/legend/software/LEGENDLab-Backup/prune.sh
16 */2 * * * /usr/bin/bash /home/legend/software/LEGENDLab-Backup/prune_log.sh(view the crontab with crontab -l)
Initate borgbackup
borg init --encryption=none artemis:/mnt/artemis02/users/legendlab/backup/FCDAQ-2025useful commands:
borg info artemis:/mnt/artemis02/users/legendlab/backup/FCDAQ-2025
borg list artemis:/mnt/artemis02/users/legendlab/backup/FCDAQ-2025