Login  Sign up

How to setup and restore database "Backups" & "Full Backups"?

"Backup" and "Full Backups"

The farmerswife (fw) Server application comes with two different built-in backup solutions, which complement each other.

The "Backup" process is part of the "DB Save" process. It continuously takes timed snapshot backups of your main farmerswife database (current45.efdb) and the SQL-lite helper-databases (fwdb.db3 and despatches.db3) files. 
These are stored within the "backups" sub-folder within the farmerswife Server's "system" folder. 

We recommend for the timed interval of the "Backup Every:" setting to be set to: 15 min.

And the corresponding "Backups" setting should either be set to "Auto" or "100" to cover 24h.

If you deviate from this pattern ensure your hardware is up for the task in relation to the sizes of the involved files!

Also NOTE: the intervals should never be longer than 15 min. to minimize potential data loss on a catastrophic event; e.g. a power-cut on the fw Server host machine. The fw Server app is allowed to skip the "DB Save" process once! And should the "DB Save" process fail again, then the fw Server switches into "panic mode" and will attempt this right away multiple times and finally kill itself and crash to get your attention that something is wrong! In this scenario and above recommended configuration the max. duration of data loss is for the last 30 min.

The "Full Backup" functionality is similar, but this is designed for "daily system backups". This process copies the fw Server's root installation directory/package, and by default does NOT include the "files" sub folder, which typically can contain big video clips.

VERY IMPORTANT: The "Full Backup Folder" path should NOT be pointing to the same disk/volume as the fw Server's root-installation folder! 

VERY IMPORTANT: Ensure that you provide enough storage capacity depending on the type and quantity of files you will be and are using within farmerswife. This should be verified at least once per year.

Backup Every: Choose how often the fw Server will do a "DB Save" process; recommended best practice and default is set to Backup Every: 15 min..

Backups: Select the amount of Backups to be "kept" and thus stored within the "backups" folder, i.e. once that number is reached the oldest backup will be deleted. Note: if you do a mouse over the word "Backups" you will see the behaviour of the "Auto" option.

Full Backup Time: Select at what time the farmerswife Server shall perform the Full Backup. The Server application must be running at that time.

Full Backups: Select the amount of Full Backups to be stored, i.e. once that number is reached the oldest full backup will be deleted.

Zip Backups: By default this legacy setting is disabled in order to improve the stability and performance of your system. Do NOT enable it! This is a legacy setting, which can cause random low level crashes. Also this setting will be removed in the foreseeable future.

Full Backup Folder: Click on path selector field, to point to a specific network storage path for the "Full Backup" folder. We recommend creating a new backup-folder on a different physical hard drive, as a sensible precaution against data loss. Please make sure that the Server application has access to this folder and that the path is correctly defined. On Windows, this will need to be correctly "mounted" with a Drive Letter. Also ensure regardless of the used Operating System, that this path will be auto-mounted after a host machine restart.

Include Files Folder In Full Backup: Select "Yes" to include all files and clips in your "Full Backup" folder. This setting together with the amount of data you have stored within the "files" folder has direct implications on how long the Full Backup process will take. If folders have been broken out using the various built-in functionality, this will prevent this feature from being enabled. Here we're typically talking about Terabytes of data, being located on network storage locations. Here, other backup solutions need to be put in place on your side.

Forced Shutdown: This functionality provides automated nightly restarts of your WIFE system. Select Yes if you wish to restart the Server during the night.

Mode: By default it is set to "Restart". But if you are running the farmerswife Server as a service of your operating system, select "Quit" and define your desired settings within your operating system.

Time: Select the time when the defined action should take place.

Weekdays: This functionality was implemented on v6.4 and is intended to be used together with "Use SQL" and "SQL Mode > Full Dump Only". This might be changed on following versions.

Manual Backup Operations:

  • Backup Now: By clicking this button on the running fw Server application window you manually initiate the standard database back-up process. In the Server Log Window you will now see “Manual Database Save” followed by the 5-step "DB Save" process.
  • Full Backup Now: Click this button on tthe running fw Server application window to create a manual "Full Backup" of the farmerswife Server application. This operation is recommended to be done before an upgrade of the fw Server application or any other modifications within the installation folder structure. The Full Backup path can be set to the local machine or any host which is accessible through the LAN. We recommend to NOT store the "Full Backups" on the same volume/disk as where the fw Server application is installed!

How to restore a Backup:

To restore a backup, shut down (Quit) the fw Server application (notify all connected users first), and access the application installation directory.

On Mac typically go to your "Applications" folder and on the "farmerswife Server" app select it and right-mouse click and use "Show Package Contents". You should now see the "system" folder.

On Windows you can typically use the "farmerswife Server" Desktop icon, right-mouse click and use "Open file location" and the Windows Explorer will open inside the fw Server's root installation folder. You should now see the "system" folder.

  1. Go to the "system" folder and first review the "log.txt", to get a better understanding of what might have happened, and how far back in time you need to go.

    The oldest data is at the top and the latest data is at the bottom of the log.txt file.
    Scroll to the very end of the log.txt file and then gently scroll up.

    "DB Save" complete process:

    Process ID: Date-Stamp:TimeStamp: Action
    1234: yyyymmdd:hhmm:    DB Save Starting

    1234: yyyymmdd:hhmm:    DB Save: Saving To Disk

    1234: yyyymmdd:hhmm:    DB Save: Saving Sqlite DB To Disk

    1234: yyyymmdd:hhmm:    DB Save: Saving Backup

    1234: yyyymmdd:hhmm:    DB Save Completed

    This indicate a fw Server app launch.

    You might have to repeat and try different sets of DB files by going back in time. This depends on the nature of the incident.

  2. Then re-name each of the existing files within your "system" folder from: 
    current45.efdb, fwdb.db3 and despatches.db3 
    ... to e.g."OLD_current45.efdb", etc.. or "CORRUPTED_current45.efdb", etc.
  3. Go to the "backups" folder which is located within the "system" folder, view the files in list mode and sort them by "Date Modified", so you can find the latest backup files.
  4. Copy all 3 files as per info from step "1." with the same "id"-info and paste them into the "system" folder. Now rename each of them according to their file type extension: 
    current45.efdb, fwdb.db3 and despatches.db3.

    Rename example:
    id201707271315290000001488.efdb => current45.efdb
    id201707271315290000001488.db3 => fwdb.db3
    id201707271315290000001488_despatches.db3 => despatches.db3
  5. Now you are ready to start the fw Server with the recovered backup files.

Did you find it helpful? Yes No