Announcement

Collapse
No announcement yet.

Preserve folder structure of 'backed up' overwritten files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Preserve folder structure of 'backed up' overwritten files

    Hi,

    I have systems I sync with many subfolders and repeated filenames within them. They are on client sites so version control isn't always present. I'll receive a 'code package' which I'm to copy over the old files on the server, but I'd of course like to keep the 'overwritten files' somewhere so if I need to roll back, I can copy the old files back over again.

    BC gets very close to this in the Options -> Backup area, where it lets me specify a directory to put the overwritten files to. However, they all end up in the root of that directory, and subfolders aren't preserved. So this is of limited utility in all but very simple cases.

    My question then is:
    a) Could I request an option that says 'preserve folder structure' in that backup options menu?
    b) In the meantime, is there a script that could perform the same purpose?

    Many thanks!

    Mark

  • #2
    Thanks for the suggestion. A backup to folder option that preserves folder structure is on our wish list for a future release.

    Here's an example script that backs up files with folder structure before syncing:

    criteria timestamp
    load c:\source c:\target
    expand all
    select rt.older.files
    copyto right path:base c:\backup
    sync update:lt->rt
    Chris K Scooter Software

    Comment


    • #3
      thanks

      Thanks for adding it to the list Chris, I'm sure many aside from myself would benefit!

      I will give the script a try in the meantime.

      Mark

      Comment


      • #4
        Hi guys

        Did this get done? Do backups now have a preserved file structure?

        Can I make a request for a backup option that the files are added to a zip file whose filename obeys a pattern?
        e.g. if i tick "make a zip file in [choose] folder" and set filename pattern of: "bcbackup%yyyy%%MM%%dd% %hh%%mm%%ss%" it will allow me to make a new zip file every time I run a sync

        Many thanks!

        Comment


        • #5
          Hello,

          Thanks for the suggestion. This is not an automatic option yet, but you could use the script example above, or manually select the files that are about to be replaced and use the Copy To Folder command to manually back them up.

          Update: The Copy To Folder command can create zips, as long as you use .zip as part of the folder path.
          Last edited by Aaron; 13-Dec-2012, 02:07 PM. Reason: Copy to Folder can create zips.
          Aaron P Scooter Software

          Comment


          • #6
            Can the script/BC setup be modified in any way to copy files that have a different content, rather than going on file date?

            Comment


            • #7
              To copy based on content differences, change the criteria command. See the "Scripting Reference" topic in BC3's help file for the full list of options.

              Example:

              criteria binary
              load c:\source c:\target
              expand all
              select rt.diff.files
              copyto right path:base c:\backup
              expand all
              select left.diff.files left.orphan.files
              copy left->right
              Chris K Scooter Software

              Comment

              Working...
              X