# Set up remote backup

## <span class="mw-headline" id="bkmrk-client-server-setup-1">Client server setup</span>

1. Log into server via SSH
2. <span class="mw-headline">Ensure that the backup ssh-certificate is installed</span>
    1. <span class="mw-headline">On old servers running [Legacy CLI](https://docs.tsnocode.com/books/command-line-tools/page/legacy-cli)</span>
        1. Run: tsrefreshscripts.sh
        2. Run: tsbackupcertificates.sh
        3. Check if cronjobs are missing: sudo crontab -l 
            1. Run: tsinstallcronjobs.sh
    2. <span class="mw-headline">On newer servers running [Current CLI](https://docs.tsnocode.com/books/command-line-tools/page/current-cli "Current CLI")</span>
        1. <span class="mw-headline">Run: ts update-script</span>
        2. <span class="mw-headline">Run: ts backup-database-rsync</span>
3. <span class="mw-headline">Ensure that port 22 is open for TCP trafic from the backup server IP</span>
4. <span class="mw-headline">Run the license report service manually, if it has never been executed</span>

## <span class="mw-headline" id="bkmrk-backup-server-setup-1">Backup server setup</span>

1. <span class="mw-headline">Ensure that the server is present in the server-list on the support-server</span>
2. <span class="mw-headline">Check the *Backup* option</span>
3. <span class="mw-headline">Set a unique name for the backup</span>
    1. <span class="mw-headline">Only lowercase and a-z</span>
4. <span class="mw-headline">Save</span>

## <span class="mw-headline" id="bkmrk-validate-backup-1">Validate backup</span>

1. Wait to 24h passes
2. Check the server-record on the support-server 
    1. Ensure that a backup size is recorded and last-backup is within the last 24 hours