Automating Backups

For Pier running on Pharocloud.com the image persistency is not working so well, it gives errors with the underlying OS. With improvements being made to PierToDo frequently, saving frequently was not an issue, as life gets busier, automating is helpful. Also when doing local development, it is useful to have a full-feature wiki with eccentric links to test.

Steps:

  1. Create a re-occurring task with the following contents:
    Convert TimeStamp to DateAndTime:

    PBPost allInstances do: [ :e | e publication class = TimeStamp ifTrue: [ e publication: (DateAndTime date: e publication asDate time: e publication asTime) ] ].
    PRToDoTask allInstances do: [ :e | e due class = TimeStamp ifTrue: [ e due: (DateAndTime date: e due asDate time: e due asTime) ] ].

    Backup the wiki using the Pier export:

    (PRScheduledTaskExamples newForKernelNamed: 'Pier') backupTo: 'http://smalltalkhub.com/mc/JohnCBorden/miscellaneous/main' as: 'JohnCBorden' authenticatedBy: JohnAuthentication

  2. In the image, create the global variable JohnAuthentication, assigning your password to smalltalkhub.
  3. Automate the task by executing something similar to the below in a workspace:

    (PRPathLockup start: (PRKernel instanceNamed: 'Pier') root path: '/John Borden/Todo/Automate Backup of Pier to Code') automate

Posted by John Borden at 9 September 2015, 3:36 pm link