To get you started, consider this approach. These are general steps, to be translated into script code if you think they will fit your requirements.
If the Historical QVD exists, load it into memory but exclude all rows for the current month (SnapShotMonthYear).
From the DBMS, load all rows belonging to the current snapshot and tag them with SnapShotMonthYear = CurrentMonth+CurrentYear. Concatenate this set to the historical table.
Save the table to the historical QVD (thereby overwriting the previous version!)
If the current QVW doesn't contain a UI, drop the table and leave.
The advantages of this strategy are that the operation is pretty efficient, and that you can repeat the snapshot-taking without accumulating too much data. Every time you repeat the reload, the new snapshot for the current month will overwrite the previous snapshot of the current month.
BTW SnapShotMonthYear is a field I am adding to your data to tag the rows of your snapshot-QVD.
Much like an Excel spreadsheet, a QVD file cannot be appended to. You'll have to load it into RAM, append to the table in memory and rewrite the source qvd to get the same effect. Actually this is much quicker than adding to an existing file, because if you load and save QVDs in a straightforward fashion, you maintain their extreme R/W-speed.