Question

Photo of Seth Thomas

0

Website/backup size

In creating backups of our website its showing over 9GB of files/data. I'm wondering if that is normal? Are there update files and other files/cache I can periodically clear prior to creating backups in order to keep the overall size down?

  • Photo of Daniel Hazelbaker

    0

    Rock automatically clears its own cache.  9GB is a lot, but depending on how you are storing stuff that may be correct.  If you have lots of data stored in the CMS File Browser, that is stored in the website folder. If you have lots of Binary Files configured to store on File System, that is stored in the website folder as well.

  • Photo of Luke Taylor

    0

    Our database backup is about 4gb, and wwwroot is about 2gb as a 7zip.  We don't store most files in the database (mostly check images), the rest go to filesystem.  Those files will be found in wwwroot/App_Data/Files, generally. That would be the place to look for gigantic files, like someone attaching an .mp4 file to an email to their small group.

    We haven't come up with a great plan to purge older data yet.  

  • Photo of Ken Roach

    0

    I just reduced our db from over 7GB to under 1GB by truncating the WorkflowLog file.  Check out  https://github.com/SparkDevNetwork/Rock/issues/1670. 

    Use the following SQL to find your big files:

    SELECT

    s.Name AS SchemaName,

    t.Name AS TableName,

    p.rows AS RowCounts,

    CAST(ROUND((SUM(a.used_pages) / 128.00), 2) AS NUMERIC(36, 2)) AS Used_MB,

    CAST(ROUND((SUM(a.total_pages) - SUM(a.used_pages)) / 128.00, 2) AS NUMERIC(36, 2)) AS Unused_MB,

    CAST(ROUND((SUM(a.total_pages) / 128.00), 2) AS NUMERIC(36, 2)) AS Total_MB

    FROM sys.tables t

    INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id

    INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id

    INNER JOIN sys.allocation_units a ON p.partition_id = a.container_id

    INNER JOIN sys.schemas s ON t.schema_id = s.schema_id

    GROUP BY t.Name, s.Name, p.Rows

    ORDER BY Total_MB desc,s.Name, t.Name