• 1 Post
  • 23 Comments
Joined 1 year ago
cake
Cake day: June 20th, 2023

help-circle











  • Um, Iraq and Afghanistan? We absolutely DESTROYED ALL of Iraq’s infrastructure in like a week and then GW flew out to an aircraft carrier with a banner that said “Mission Accomplished”.

    Then we spend the next 20 years kicking in doors and killing civilians cause reasons.

    Then we bail and leave all the dudes that helped us out behind so they can pay the price for helping the enemy…good times…

    Israel is not deserving of support by the civilized world.

    Totally agree but just like the drug commercial in the '80s…“I learned it from watching you!”








  • What you want is a bash script and a cron job that calls it. Most of what you need is likely already installed for you.

    “crontab -e” will pull up your crontab editor. Check out “man crontab” first to get an idea of the syntax…it looks complicated at first but it’s actually really easy once you get the hang of it.

    Your script will call tar to create your backup archive. You’ll need the path to the folder where your files to backup are and then something like: tar -C PATH_TO_FILES -czf PATH_AND_NAME_OF_BACKUP.tgz .

    That last dot tells it to tar up everything in the current folder. You can also use backticks to call programs in line…like date (man date). So if your server software lives in /opt/server and your config files you want to backup are in /opt/server/conf and you want to store the backups in /home/backups you could do something like:

    tar -C /opt/server/conf -czf /home/backups/server_bkup.`date +%Y%m%d`.tgz .
    

    Which would call tar, tell it to change directory (-C) to /opt/server/conf and then create (-c) +gzip (-z) into file (-f) /home/backups/blah.tgz everything in the new current directory (.)

    I don’t know if that’s what you’re looking for but that would be the easiest way to do it…sorry for potato formatting but I’m on mobile