Skip to main content
Galeodan
Known Participant
April 26, 2021
Question

How do I get DW to save backup versions of the files I am editing?

  • April 26, 2021
  • 4 replies
  • 3246 views

How do I configure DW to save backups of files, so I can rollback to a previous version of any file (HTML, CSS etc.)? I don't see anything in preferences.

    This topic has been closed for replies.

    4 replies

    B i r n o u
    Legend
    April 27, 2021

    Sorry, this is a bit long, but the idea is to put it all together to better understand what we are talking about.

    Backup and versioning methods during the development phases of web sites and applications has always been a real headache. Moreover, it depends if you are the only one working on the project, or if several people are working together on the same code pages. When I talk about code, I include HTML, CSS, JavaScript, server language, database and client/server communication languages.


    As far as the development itself is concerned, there are two main approaches:
    on the one hand, the old-fashioned (it is not pejorative) development which consists in basing oneself on a well-defined set of specifications (we know more or less where we are going, and how to get there),
    and on the other hand, a more recent method, which was clarified about twenty years ago, through the agile manifesto, which allows you to constantly adapt as you develop to the 'evolving' needs of the client.


    So of course, depending on your approach, the backup processes may be based on different methods and conventions.
    For my part, for years, with the teams I have worked with, we have relied (depending on the team) alternately on CVS or SVN.
    There was a time when Dreamweaver integrated a version of SVN (I think at the time of CS 4)... it wasn't so nicely implemented... but it was a start...

     

    From now on, and for the last fifteen years, there is GIT, and it goes without saying that the world of backup and collaborative work has made considerable progress.
    Well, all this said, it doesn't bring much, except to stir the air... a lot of theory... and little practice.


    so as Nancy says, it is up to each one to organize himself according to his wishes, and to adapt as well as possible according to his own work process.


    the problem in web development is that there is a host file that includes external, interdependent and multiple files.
    making an incremental backup of this host file will not solve the interdependencies of the external files, in case of a roll back to a previous version.


    To explain this problem by example, let's take a very simple case of an interaction between an HTML file and a simple CSS file. Let's keep it very basic.


    i.e... say that one have a v1 html construct as this following code

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>v1</title>
        <link rel="stylesheet" href="styles.css">
    </head>
    
    <body>
        <div class="bloc">The bloc is cyan</div>
    </body>
    </html>

    and the CSS file linked to it as

    .bloc {
        width: 100px;
        height: 100px;
        background-color:cyan;
    }

    our first version is finished... so the best way to save it is to clone the whole folder (including the HTML and the CSS files), and to start again on the clone of the whole folder. Because if we save only the HTML file in v2 and we progress the file by modifying its content in the following way

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>v2</title>
        <link rel="stylesheet" href="styles.css">
    </head>
    
    <body>
        <div class="bloc">The bloc is now red</div>
    </body>
    </html>

    then, of course, we adapt the CSS file accordinly

    .bloc {
        width: 100px;
        height: 100px;
        background-color:red;
    }

    everything is saved... and that's fine...

     

    but... if we decide to get back to the previous HTML file and so, if we now roll back the HTML file in v1... the process is broken, because the text will be The bloc is cyan... but the color in the dsplay will still be red.


    we realize that during the evolution several files have been modified and so all of them have to take back their state at the time of the saved version of the host file. Hence the simplicity if the integral files are put aside and used (integral folder, HTML and CSS), and not just the intermediate version of the host file.

     

    so imagine when we have tens of files in the projects, not saying hundreds...

     

    that's why Dreamweaver's history allows us to swap each of the modifications within each of the files (it's a bit confusing but it makes sense).
    It's a pity that this history is lost when one close the files, but that's where GIT can take over.


    not to mention GIT... if you adopt the approach of saving by folder at each important stage of the project, and then use a good comparison tool (for example ultra compare), one can easily find all the changes that have occurred between the various files... this is where GIT becomes very useful once again, especially if several people are working on the project and need to merge previous and current version of the apps...

     

    but once again, and as OS mentions, especially if you work alone, a bit of organization and a well laid out method can also help with versioning, and to go back if the project goes haywire.

     

    now and to conclude, as far as I'm concerned, I find it perfect that Dreamweaver doesn't offer an autosave feature, I prefer to control exactly when I decide to save, file per file...

     

     

     

     

     

    Legend
    April 27, 2021

    That's not my method of workflow. I work with all the css, javascript, html code in one file until such time as the construction is finalised/approved, then I move it to external files. Mostly after that there are only minor changes which are relatively easy to manage, or I can roll-back to a version where all the code is cited together.

     

    I find it much quicker to work this way, where all essential code is in one location, rather than having the tedious problem of having to keep locating, opening extra editor tabs, trying to manage several key files independently at one time. Thats a very confusing, slow workflow in my opinion.

     

    The only issue I would have in reference to having no autosave is you HAVE to remember to save your work, rather than it being automatically backed-up regularly. I use both options, manually save at various intervals, plus have Time Machine back up automatically. Now it looks like when I use any of the Jetbrains software I can have a third fall-back method, without having to depend on more dependenies in my site folder, which in my opinion, just creates a management issue and a mess to start with, which is what you call a 'more recent method'.

     

    I guess its each to his/her own. I'm seeing really worrying 'advances' in web-development, which are more complex than they need be. Yes IF you work in a large team, have blue chip clients then these methods would be applicable, in some cases. However many independent developers, small teams take their lead from these large co-operations, thinking this must be the correct process and then use those to process something which can be produced in a less bloated and unnecessarily complex way

     

     

    B i r n o u
    Legend
    April 27, 2021

    interesting, just a question how do you share the common parts between pages? if everything is in the same file, nothing is shared? so you duplicate the common resources. well, as you say, each own has his own method.

    Nancy OShea
    Community Expert
    Community Expert
    April 26, 2021

    When you make mistakes during an editing session, use Ctrl / Cmd + Z to undo and repeat as required.

    For more Undo options and History states, go to Preferences > General tab (see screenshot.)

     

     

    Nancy O'Shea— Product User & Community Expert
    Galeodan
    GaleodanAuthor
    Known Participant
    April 26, 2021

    The situation I am trying to avoid is that which I suffered yesterday. In the process of attending to other tasks, I inadvertently deleted a chunk of code and exited DW before I noticed. I don't recall DW asking if I wanted to save the files but then I didn't realize I had damaged one of them and maybe just said <yes>. I noticed pretty much immediately after but I had already lost a chunk of work which would be difficult to reconstruct without a very recent version of the file, preferably the 2nd-last one saved. 

     

    A number of applications can automatically save the last 1, 2, 3 etc. versions of any file you are working on. I hoped DW might have the same facility but could not see anythng in Preferences. I will checkout Git but I suspect it might be overkill, or maybe no help, for the circumstance I am trying to avoid. I do backup nightly but I needed a file version much newer than the last backup. I also keep backup versions after each significant edit but even they would not have been much help. Luckily, I had uploaded a very recent version of the file and was able to recover pretty quickly. It could have been a lot worse.

     

    Maybe there's an extension? 🙂

    Legend
    April 26, 2021
    quote

    The situation I am trying to avoid is that which I suffered yesterday. In the process of attending to other tasks, I inadvertently deleted a chunk of code and exited DW before I noticed.

     

     

    Well nothing will help you there unless you have used some method to back it up, regardless of what method you choose you have to manually instigate it or hope something like time machine (on a mac) was doing its job near to the time you didnt save your work.

     

    I think what you are asking for is 'does Dreaweaver have an inbuilt backup system that monitors and saves a back-up file every so many minutes'? If so I dont know, one of the other contributors that use DW may be able to answer that.

     

    The situation you found yourself in is a bit like the power suddenly going off without you having time to save your work, whether using a simple back-up workflow or a more complex one like git, which involves commiting the changes and pushing the file to git.

    Nancy OShea
    Community Expert
    Community Expert
    April 26, 2021

    My local site folder is backed up nightly to a cloud server.  And the backup files are retained for 30 days in case I need them.  

     

    For a 3 page website, I don't think you need an elaborate version control system.  Use File > SaveAs and give files a new filename that includes date & time (eg.  custom_styles.4.26.4pm.css) or whatever designation you like.

     

    Nancy O'Shea— Product User & Community Expert
    B i r n o u
    Legend
    April 26, 2021

    yep, the only problem , eother wth three files, is when your external files evolve in fonction of the hosting files... it's often a mess, when rolling back the hosting files and not the dependant files... and so on...

    Legend
    April 26, 2021
    quote

    yep, the only problem , eother wth three files, is when your external files evolve in fonction of the hosting files... it's often a mess, when rolling back the hosting files and not the dependant files... and so on...


    By @B i r n o u

     

    I've never personally found it a mess and I build websites of considerably more than 3 pages so I can't see why it would be a mess. Whatever method you use, if you're organised it should work perfectly. Of course if youre not organised then poo happens.

     

    Maybe it would become a mess for you considering you're using poopack compilers and command line stuff, node js flooded with files and folders, dependencies which you have zero idea what they contain. I can understand that might become a bit of  a mess, yes, but a simple workflow, as it can be...........

    B i r n o u
    Legend
    April 26, 2021

    one of the way to handle back up and versionning is to use GIT . Dreamweaver has integrate GIT since some builds now, and facilitate its use directly from the User Interface. https://helpx.adobe.com/dreamweaver/user-guide.html/dreamweaver/using/git-support.ug.html

    but you will also have to understand what is GIT if you never heard about it. https://www.git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F

    Otherwise, you can always set up your own method, by regularly backing up your local site to an external drive. Beware, this will quickly become complex, because of the multiple files linked to your host file themselves evolving independently over time within your application