Backups: How often do you do them?

Discussion in 'Domains, Hosting and Servers' started by cpvr, Jun 21, 2012.

  1. oman

    oman Regular Member

    Joined:
    Oct 4, 2012
    Messages:
    74
    Likes Received:
    27
    Location:
    Sydney, Australia
    Could you please share how you achieve this? Is it via the full backups system?
     
  2. Creaky

    Creaky Regular Member

    Joined:
    Aug 15, 2011
    Messages:
    310
    Likes Received:
    96
    Location:
    London
  3. eva2000

    eva2000 Regular Member

    Joined:
    May 22, 2012
    Messages:
    138
    Likes Received:
    107
    Location:
    Brisbane, Australia
    For database backups - one server have it backed up every 9 hrs...

    Example output from a custom script I wrote for some of my paying consult clients below. You get output logged to backuplogs directory log file + auto email copy of backup output.

    • Auto check to see if backup target directory has enough free disk space to hold database backups and alerts you to lack of disk space
    • All backup and deletion/rotation routines have inbuilt error checking and notification in case of failed backups occur
    • Backups databases + database schema only (no data just table structure) + mysql user privileges/grants every 9hrs
    • Saves the last 10-14 days of backups in compressed state and rotates and clean ups up older than 14 day backups only after built in error checking confirms backups were successful. If backup fails, inbuilt error detection aborts clean up/rotation and doesn't proceed with deletion routine
    • Auto email notification after backup to list what was backed up, where it was backed up to and what was deleted (auto rotation/clean up)
    • Auto log file created in backuplogs directory so you can look back at older backups, check disk usage and backup time trends etc
    • Also logs how long each database backups took in seconds as well as how much cpu and memory usage was used for the process
    • Uses multi-threaded gzip compression, pigz for up to 33x times faster compression speeds than gzip http://vbtechsupport.com/2094/. Posted about it here http://admin-talk.com/threads/7117/
    Code:
    Successfully backed up database: vb420pl3
    Successfully backed up database schema: vb420pl3
    pigz -1R /home/username/backups/vb420pl3_031212-004501.sql
    pigz -1R /home/username/backups/vb420pl3_schema_031212-004501.sql
    Number of backup files in /home/username/backups before backup or deletion: 114
    Deleting older backup: /home/username/backups/vb420pl3_251112-004501.sql.gz
    Deleting older backup: /home/username/backups/vb420pl3_schema_251112-004501.sql.gz
    Number of backup files in /home/username/backups after backup or deletion: 114
     
    ----------------------------------------------------------------------------
    /root/tools/mandbbackup.sh 0.0.9
    ----------------------------------------------------------------------------
    /home/username/backups resides on partition which has
    677083 Megabytes of disk space available
    ----------------------------------------------------------------------------
    MySQL data directory located at: /home/mysql/
    MySQL data directory size: 42851 Megabytes
    ----------------------------------------------------------------------------
    [PASS] you have enough free disk space to store MySQL directory size on:
    /home/username/backups
    ----------------------------------------------------------------------------
     
    ----------------------------------------------------------------------------
    Backup vb420pl3 Data: real: 131.86s cpu: 37% maxmem: 13280 KB cswaits: 35023
    ----------------------------------------------------------------------------
    Backup vb420pl3 Schema: real: 1.82s cpu: 2% maxmem: 6992 KB cswaits: 5479
    ----------------------------------------------------------------------------
    Deleting older backup: /home/username/backups/vb420pl3_251112-004501.sql.gz
    Deleting older backup: /home/username/backups/vb420pl3_schema_251112-004501.sql.gz
    ----------------------------------------------------------------------------
    Backup MySQL user GRANT permissions for:
    #mysqlusername root @ 127.0.0.1
     
    *************************************************************************
    created MySQL database backups at: /home/username/backups
    *************************************************************************
    Nov 25  09:47  182M  vb420pl3_251112-094501.sql.gz
    Nov 25  09:47  26K    vb420pl3_schema_251112-094501.sql.gz
    Nov 25  18:47  182M  vb420pl3_251112-184501.sql.gz
    Nov 25  18:47  26K    vb420pl3_schema_251112-184501.sql.gz
    Nov 26  00:47  182M  vb420pl3_261112-004501.sql.gz
    Nov 26  00:47  26K    vb420pl3_schema_261112-004501.sql.gz
    Nov 26  09:47  182M  vb420pl3_261112-094501.sql.gz
    Nov 26  09:47  26K    vb420pl3_schema_261112-094501.sql.gz
    Nov 26  18:47  182M  vb420pl3_261112-184501.sql.gz
    Nov 26  18:47  26K    vb420pl3_schema_261112-184501.sql.gz
    Nov 27  00:47  182M  vb420pl3_271112-004501.sql.gz
    Nov 27  00:47  26K    vb420pl3_schema_271112-004501.sql.gz
    Nov 27  09:47  182M  vb420pl3_271112-094501.sql.gz
    Nov 27  09:47  26K    vb420pl3_schema_271112-094501.sql.gz
    Nov 27  18:47  182M  vb420pl3_271112-184501.sql.gz
    Nov 27  18:47  26K    vb420pl3_schema_271112-184501.sql.gz
    Nov 28  00:47  182M  vb420pl3_281112-004501.sql.gz
    Nov 28  00:47  26K    vb420pl3_schema_281112-004501.sql.gz
    Nov 28  09:47  182M  vb420pl3_281112-094501.sql.gz
    Nov 28  09:47  26K    vb420pl3_schema_281112-094501.sql.gz
    Nov 28  18:47  182M  vb420pl3_281112-184501.sql.gz
    Nov 28  18:47  26K    vb420pl3_schema_281112-184501.sql.gz
    Nov 29  00:47  182M  vb420pl3_291112-004501.sql.gz
    Nov 29  00:47  26K    vb420pl3_schema_291112-004501.sql.gz
    Nov 29  09:47  182M  vb420pl3_291112-094501.sql.gz
    Nov 29  09:47  26K    vb420pl3_schema_291112-094501.sql.gz
    Nov 29  18:47  182M  vb420pl3_291112-184501.sql.gz
    Nov 29  18:47  26K    vb420pl3_schema_291112-184501.sql.gz
    Nov 30  00:47  182M  vb420pl3_301112-004501.sql.gz
    Nov 30  00:47  26K    vb420pl3_schema_301112-004501.sql.gz
    Nov 30  09:47  182M  vb420pl3_301112-094501.sql.gz
    Nov 30  09:47  26K    vb420pl3_schema_301112-094501.sql.gz
    Nov 30  18:47  182M  vb420pl3_301112-184501.sql.gz
    Nov 30  18:47  26K    vb420pl3_schema_301112-184501.sql.gz
    Dec 1  00:47  182M  vb420pl3_011212-004501.sql.gz
    Dec 1  00:47  26K    vb420pl3_schema_011212-004501.sql.gz
    Dec 1  09:47  182M  vb420pl3_011212-094501.sql.gz
    Dec 1  09:47  26K    vb420pl3_schema_011212-094501.sql.gz
    Dec 1  18:47  182M  vb420pl3_011212-184501.sql.gz
    Dec 1  18:47  26K    vb420pl3_schema_011212-184501.sql.gz
    Dec 2  00:47  182M  vb420pl3_021212-004501.sql.gz
    Dec 2  00:47  26K    vb420pl3_schema_021212-004501.sql.gz
    Dec 2  09:47  182M  vb420pl3_021212-094501.sql.gz
    Dec 2  09:47  26K    vb420pl3_schema_021212-094501.sql.gz
    Dec 2  18:47  182M  vb420pl3_021212-184501.sql.gz
    Dec 2  18:47  26K    vb420pl3_schema_021212-184501.sql.gz
    Dec 3  00:47  182M  vb420pl3_031212-004501.sql.gz
    Dec 3  00:47  26K    vb420pl3_schema_031212-004501.sql.gz
     
    *************************************************************************
    created MySQL user GRANT backups at: /home/username/backups
    *************************************************************************
    Dec 1  22:35  1.8K  backup_mysqlgrants_011212-223528.sql.gz
    Dec 1  22:42  1.8K  backup_mysqlgrants_011212-224207.sql.gz
    Dec 1  22:42  1.8K  backup_mysqlgrants_011212-224248.sql.gz
    Dec 1  22:44  1.8K  backup_mysqlgrants_011212-224451.sql.gz
    Dec 2  00:48  1.8K  backup_mysqlgrants_021212-004501.sql.gz
    Dec 2  00:54  1.8K  backup_mysqlgrants_021212-005013.sql.gz
    Dec 2  09:48  1.8K  backup_mysqlgrants_021212-094501.sql.gz
    Dec 2  09:54  1.8K  backup_mysqlgrants_021212-095013.sql.gz
    Dec 2  18:48  1.8K  backup_mysqlgrants_021212-184501.sql.gz
    Dec 2  18:54  1.8K  backup_mysqlgrants_021212-185011.sql.gz
    Dec 3  00:48  1.8K  backup_mysqlgrants_031212-004501.sql.gz
    ------------------------------------------------------------------------
    Last backup sql / file(s) created at:
    /home/username/backups/vb420pl3_031212-004501.sql.gz
    /home/username/backups/vb420pl3_schema_031212-004501.sql.gz
    /home/username/backups/backup_mysqlgrants_031212-004501.sql.gz
    ------------------------------------------------------------------------
    Backup Log:
    /home/username/backuplogs/vb420pl3_backup_031212-004501.log
     
    Iconic likes this.
  4. carlalexander

    carlalexander Regular Member

    Joined:
    May 23, 2013
    Messages:
    61
    Likes Received:
    7
    I'd say twice every month, but at times I do it as many as once a week that's before I get lazy or distracted with other things. I recommend a regular back up though. :)
     
  5. ProSportsForums

    ProSportsForums Regular Member

    Joined:
    Dec 25, 2012
    Messages:
    529
    Likes Received:
    232
    Location:
    St Petersburg, Florida
    Twice Daily. Members get pissed by loss of data.
     
    Brandon likes this.
  6. zappaDPJ

    zappaDPJ Regular Member

    Joined:
    May 27, 2013
    Messages:
    250
    Likes Received:
    165
    Location:
    London, England
    My databases get backed up daily using a cron job.

    I also download copies of my databases and forum installations to a local hard drive weekly. That is a real chore but it's paid off on more than one occasion because of catastrophic failures (including backups) at the hosting facility. To date the most data I've lost was around 36 hours worth.
     
    Big al likes this.
  7. thebrad

    thebrad Regular Member

    Joined:
    Jun 29, 2013
    Messages:
    172
    Likes Received:
    18
    Location:
    Liverpool
    I actually haven't made a backup for my current forum but hopefully it will be ok i may do one soon enough ~(if my host allows me) if they don't then sadly ill have to pray nothing happens to x10hosting or my site :D
     
  8. Gregman

    Gregman Regular Member

    Joined:
    Jul 12, 2013
    Messages:
    66
    Likes Received:
    21
    Location:
    Michigan
    I back up ever 3 days because my website is really small right now. How ever if it was busy I would be doing daily backups.

    Greg
     
  9. GasMan320

    GasMan320 Regular Member

    Joined:
    Aug 30, 2012
    Messages:
    88
    Likes Received:
    71
    Location:
    Northern California
    My forum database gets backed up daily to my home server and an entire cPanel backup is done twice a week to my home server.

    Both things are automated so I don't have to do anything. An email is sent notifying me that the backup was successful.
     
  10. Dan Hutter

    Dan Hutter aka Big Dan

    Joined:
    Jul 20, 2006
    Messages:
    1,412
    Likes Received:
    515
    Location:
    New York
    I've changed since then. I now have a backup VPS with a seperate company. Daily cPanel backups go there automatically.
     

Share This Page