Skip to content
TekTinkers

TekTinkers

Learning and imagination unlock limitless possibilities in technology

  • TinkersLab
    • TinkersDocs
    • Garage LAN
    • HomeLab
  • Resources
    • Events
  • Minecraft
    • Minecraft Technologies
    • Server Tools ‘n Stuff
    • TinkersCraft
  • About
    • Education
    • Experience-Awards
    • Special Thanks
    • Volunteer-Charity
  • Toggle search form

Set backups for a Minecraft server

Posted on June 17, 2025June 18, 2025 By TekTinkers
Linux

For use when Minecraft is being run on Ubuntu Server 22 and backed up to another Ubuntu Server that is being used for file sharing.

  • sudo apt-get install openssh-client
  • sudo apt-get install sshpass

OpenSSH has scp integrated to utilize

  • sudo apt-get install cron

Cron is used for scheduling backups

  • crontab -e

opens cron to enter scheduled backup
add line below for automated backup

  • 0 0 * * * sshpass -p “password for user@nas” scp -r /path/to/files/* user@nas:/shared_folder/$(date +\%Y-\%m-\%d_\%H-\%M-\%S)/

“00***” sets the frequency to run
“scp -r” runs the utility scp while -r reads all files and files within directories.
“/path/to/files/* user@nas:/shared/folder/path/” is what files and directories to copy and where to paste them via ssh
“$(date +\%Y-\%m-\%d_\%H-\%M-\%S)/” puts all files being backed up into a folder named by date/time created.

  • crontab -l

verify’s the scheduled backup
Since Cron simply runs the command line, you can run it yourself in the terminal as well

  • crontab -l | grep scp | bash
Microsoft Coming Soon!
Minecraft, TinkersLab Tags:backup, linux, minecraft

Post navigation

Previous Post: Password Protect your WordPress Webpage

Copyright © 2025 TekTinkers - Images by CoPilot, unedited for the lol's