Syncronize script copy my server data to a Hetzner storage box.

Discussion in 'General' started by Ole Vangen, Sep 27, 2020.

  1. Ole Vangen

    Ole Vangen Member

    I have an debian server at Hetzner and I also have a storage box there.

    I have my server set up to do backup of some sites but the backup are only at the server at the moment . I would like to get these backup files copied to a storage box every day.
    I have made a smal script that is very simple running a rsynch command that moves the files and it is a smal sh script and very very simple.
    THis must naturally be run on root since I would proberly to syncronize/backup more that one site.

    I have looked and tried a bit with the crontab but I didnt manage to get the script executed and I would mess with it so I stopped.

    SO my question is.
    Do anyone have a script they can share that I can just edit?
    Do anyone has an example from their system how they have added running an sh scripy in their cron for server as root?
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    mount the storage for the ispconfig-backups?
  3. Ole Vangen

    Ole Vangen Member

    Hi and thanks for the suggestion.

    How do I run an sh script as root in the cron in ispconfig.
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Login as root, install editor you know how to use, command
    crontab -e
    choosing that editor when prompted.
    An alternative is to use directories cron.daily/ cron.hourly/ cron.weekly/ in /etc/. Put a file in there, use existing files as example.
    Ole Vangen likes this.
  5. florian030

    florian030 Well-Known Member HowtoForge Supporter

    if you want to store the ispconfig-backups on your storage-box, just create a script to mount the backupdiur and to umount. i didn't the correct names right now but i think, you can find this in the manual.
  6. Ole Vangen

    Ole Vangen Member

    Thanks, I added my script in the daily cron folder without extention and it worked.

Share This Page