BuffersBackup
A Sublime Text 2 plugin for backing up all open files/buffers on an periodic basis.
Details
Installs
- Total 628
- Win 347
- Mac 151
- Linux 130
Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- bitbucket.org
BuffersBackup
A Sublime Text 2 plugin that backs up all open buffers to file on a periodic basis, even if the buffer hasn't been saved to a file yet.
This was mainly created because I am a huge fan of Sublime's “Hot Exit” feature, but I am paranoid and worry that I will create something important in an open buffer and end up overwriting/closing it before I save it. Most backups only work if/when you save a file, but this plugin doesn't care. so this is more relaxing knowing that anything typed into Sublime can be retrieved later if necessary.
Feel free to recommend any improvements – I am by no means a Python master!
How It Works
Based on a set interval (60 seconds by default), the plugin will go through each of the open buffers and will perform a backup of the contents if it has been changed since last check or if it hasn't been backed up yet. The key feature of this plugin is that it goes based on the buffer ID and not a filename, thus allowing backups of buffers that haven't been saved to a filename yet.
The backup filenames are created in the following format:
* Buffers from Files: HHMMSS_<BUFFER ID>_<FILE NAME>
* Unsaved Buffers: HHMMSS_<BUFFER ID>_<FIRST 20 CHARS OF BUFFER>
BuffersBackup Directory structure:
* "sublimebackup/working/" - This contains the current day's backup files
* "sublimebackup/archive/" - Contains the ZIP files for each day in the format of "YYYY-MM-DD.ZIP"
On each new day, the backed up files for the previous day are zipped up and archived. Once the max retention days has been reached, the zip files are then deleted. So it's a “just set it and forget it” approach and hopefully you will never need to even open the files, but if you do, it just might save your day.
Installing
Clone this repository into your Packages directory:
hg clone https://bitbucket.org/lewisjosh/BuffersBackup
If you don't have Mercurial, then just download the source and extract it to your Packages directory.
NOTE: Your packages directory can be easily found by opening Sublime Text and then 'Preferences' -> 'Browse Packages'
New BSD License
Copyright (c) 2012, Josh Lewis (lewisjosh2@gmail.com)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.