This script will automatically save spreadsheet sheets when edited in Google docs. It also adds a "Backup" menu that allows you to manually backup the currently opened sheet as well as backup all sheets in a spreadsheet.
The backups are put into CSV files, one per sheet, with the filename format being <sheetname>--<timestamp>.csv. They're put into the directory specified in the script. See the installation instructions below for more details.
Installation:
- Open your google spreadsheet
- Open the script editor by clicking on Tools -> Script Editor
- Paste this code into the script editor
- Change the backupFolderName to the folder in which you want backups for this spreadsheet to be saved*
- Select Resources -> Current project's triggers