In Ubuntu-LAMP with Bash I host a few personal websites. All websites are under document root (/var/www/html).

This is how I currently create immediate backups on maximally-self-managed cloud services like Linode/DigitalOcean:

apt-get install zip

cib() {
    # Create an Immediate ZIP Backup (of both DB and document root, in one file);
    date="$(date \+%F\-%T)"
    mysqldump -u root -p --all-databases | zip "$drt/db-$date.zip" - # Note the hyphen before this comment;
    zip -r "${drt}/all_zipped-$date.zip" "$drt"/ -x "*/cache/*" "*/phpmyadmin/*"
    rm -f "$drt/db-$date.zip"

Is there some simple communal utility that gives the same or similar result that I won't have to maintain myself?

  • 1
    You're unlikely to find anything that backs up databases and files in one package. But not putting this as an Answer because it's all too easy for someone to contradict an opinion with fact. – roaima Nov 6 '18 at 21:26
  • 2
    Something simpler than this? Looks pretty good already! +1 – Fabby Nov 6 '18 at 21:58
  • try btrbk ..... – user1133275 Nov 7 '18 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.