Client backups

User data should be synchronised to each user's respective home directory on b.fluid.tuwien.ac.at. Home directories on b.fluid are backed up daily and can be restored for at least one year by the admins.

Setup instructions

Windows

In order to set up file synchronisation to b.fluid on your Windows client, please contact Iris Fula.

GNU/Linux, macOS, other Unix-like operating systems

Please make sure to…

export TU_USER=YOUR_TU_USERNAME
export CONFIG_DIR="${HOME}/.config/sync-to-host"
export TARGET_DIR=$(hostname -s)
export CRON_FILE=/etc/cron.hourly/b_backup-${TU_USER}

# run the backup script once (enter your TU password when asked to do so)
sync-to-host ${TU_USER} b.fluid.tuwien.ac.at ${TARGET_DIR}

# set up cron job
sudo tee ${CRON_FILE} <<EOF
#!/bin/bash
sudo -u ${USER} /usr/local/bin/sync-to-host ${TU_USER} b.fluid.tuwien.ac.at ${TARGET_DIR}
EOF
sudo chmod +x ${CRON_FILE}

Restoring data

Instructions for admins

In order to restore data from a backup, backups can be mounted to a user's home directory. Users can then access their data using an SFTP client (e.g. Nautilus on GNU/Linux, Cyberduck on macOS and WinSCP on Windows).

For example, in order to expose backup data from b.fluid to the user oswat, the following commands might be used:

export BACKUP_REPO=/mnt/backup/b/home/oswat.borg
export RESTORE_DIR=/home/oswat/restore-$(date -Idate)
mkdir ${RESTORE_DIR}
borg mount -o default_permissions,allow_other ${BACKUP_REPO} ${RESTORE_DIR}
ls ${RESTORE_DIR}

Note: As soon as users have restored their data, backups should be unmounted again:

umount ${RESTORE_DIR}