Home Download Buy Blog Forum Support

Automatic Backup Plugin

Automatic Backup Plugin

Postby SteveCooperOrg on Wed Mar 26, 2008 11:10 am

(recreating accidentally-deleted topic. See http://www.sublimetextwiki.com/cgi-bin/ ... kupsPlugin)


"Automatic Backups" is a plugin by SteveCooper.

When you edit text files (scripts, prose, whatever) you often find yourself wishing for an older version. This plugin takes a copy of every file you save and copies it into a backup directory structure, ensuring that you never lose an old version of the file.

You can download the plugin from http://www.sublimetextwiki.com/SteveCoo ... gin.py.txt

Installation instructions;

* Download the file.
* Save to your UserPluginFolder.
* Open the file and change the line that reads return "c:\\backups\\" so that it points at the folder you want to save backups to. Around line 19.
* Remove the .txt extension from the file.
* Start SublimeText
* Open the console with the View | Console menu item.
* When you save a file, you should see a line like this, indicating that the file has been backed up;

Automatic backup: backing up to d:\backups\C-drive\Documents and Settings\steve\Application Data\Sublime Text\Packages\User\AutomaticBackupsPlugin-2008-03-22-22-22-46.py`
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: Automatic Backup Plugin

Postby SteveCooperOrg on Fri Mar 28, 2008 1:43 am

A new version is up, and it's now a full-blown sublime package. Also, I've included it in my new set of packages that are automatically downloaded by my package downloader (viewtopic.php?f=5&t=39)

This means that if you install both, you shouldn't need to worry about upgrading, because you'll be able to do an 'auto-update' to get new versions of the package.

---

When you edit text files (scripts, prose, whatever) you often find yourself wishing for an older version. Ever accidentally deleted a chunk from an important configuration file, or wished you could roll back a document a few hours? This plugin takes a copy of every file you save and copies it into a backup directory structure, ensuring that you never lose an old version of the file.

Once installed, any file you save will be copied into your documents folder, eg <My Documents>\Sublime Text Backups. For example, if you change c:\autoexec.bat, you'll get a backup saved to:

`c:\Documents and Settings\yourUserName\Sublime Text Backups\c-drive\autoexec-2008-03-22-22-22-46.bat`

That end bit is the timestamp, so you can see when the file was edited.

To install it, download the package from http://www.sublimetextwiki.com/sublime- ... me-package and save it to c:\program files\sublime text\Pristine Packages. Then restart Sublime Text.

If you want to back up your files somewhere other than your documents folder, you can add an option. To change where all backups are made, open the Preferences menu and choose Preferences. Then double-click Application, and add a line like this to the end of the file;

backupDir c:\my files\archive\

To see if it's working, open the console with the View | Console menu item. When you save a file, you should see a line like this, indicating that the file has been backed up;

Automatic backup: backing up to d:\backups\C-drive\Documents and Settings\steve\Application Data\Sublime Text\Packages\User\AutomaticBackupsPlugin-2008-03-22-22-22-46.py`
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: Automatic Backup Plugin

Postby SteveCooperOrg on Fri Mar 28, 2008 1:45 am

ps, if you downloaded an earlier version, please delete it from your user directory (Eg c:\documents and settings\username\Application data\sublime text\packages\user) or you'll have two versions running at the same time.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: Automatic Backup Plugin

Postby SteveCooperOrg on Mon Mar 31, 2008 7:28 am

Hi! Feel free to update the plugin with these changes. They sound really useful. Whack them on the server and I'll pick them up with the package downloader. Nicely done.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: Automatic Backup Plugin

Postby gpfsmurf on Thu Sep 10, 2009 10:59 pm

I added a few features (on my local machine), would you like me to commit (some of) them?

  • When creating a backup of an existing file for the first time, it will first create a backup copy of the original file with a 0000-00-00-00-00-00 timestamp.
  • I added a command to show a quick panel with all the backups of the current file. WinMerge will be launched with the current file and the selected backup file.
  • Same thing but instead of launching WinMerge, the selected backup file will be shown on a 2nd pane with a 2-pane vertical layout.
  • Since that makes a lot of commands, I added a package menu.
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Automatic Backup Plugin

Postby gpfsmurf on Sat Sep 12, 2009 1:16 am

Good idea

You can access it here: http://bitbucket.org/gpfsmurf/automaticbackups/
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Automatic Backup Plugin

Postby giannesdabrun on Tue Jun 04, 2013 1:35 pm

When I try to give m Merge it returns me the following message:
"You are viewing the current version of this file. Navigate to the backup version before merging."

But I surfed a few versions back and even then the this message.
Out also that my shortcut did not work.

Someone could tell me what might be happening?
Hugs!
giannesdabrun
 
Posts: 3
Joined: Thu Jun 21, 2012 1:36 am

Re: Automatic Backup Plugin

Postby rsk82 on Mon Oct 07, 2013 5:35 pm

Is there a way to configure this package https://github.com/akalongman/sublimetext-autobackups to save timestamped backup whenever I save my file instead of doing only and overwriting the last save.

I'm using ST3. With ST2 I'v been using this https://github.com/joelpt/sublimetext-automatic-backups , but there is no update for v3.
rsk82
 
Posts: 8
Joined: Sat Feb 09, 2013 6:43 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: jfcherng and 11 guests