Auto backup script not working

Discussion in 'Systems Administration' started by uksspy, Jun 21, 2015.

  1. Im trying to make a script that will save a backup of my network every 24 hours. It seems to work just fine but then when it's done it says "tar: Exiting with failure status due to previous errors" and nothing is copied to the backups folder. When I scroll up in putty as far as I can I don't see any errors.

    My tar command: tar -cpvzf /home/minecraft/backups/$NOW.tar.gz /home/minecraft/multicraft/servers
     
  2. I would just use AutoSaveWorlds if I was use.
     
    • Funny Funny x 1
  3. MikeA

    MikeA Retired Moderator
    Retired Benefactor

    This is likely caused by it not being able to add a file to the archive, maybe a permission related error with the user that you're running it from? Try using sudo, or get a putty log of the output.
     
  4. I don't want to just save the world.
    I give my admins permission to edit the server files but I want an automatic backup to a directory they don't have access to as a precaution.
     
  5. That plugin backs it up, saves it and much more :)
     
  6. Does it back it up to a directory outside of the root server directory? For example if my server is in /minecraft/servers/hub it would save the backup to /minecraft/backups