Fog for Dev - Save each capture in its own folder automatically.


  • I have FOG running in a Development environment.
    Running scheduled jobs is working. But…

    Is there a way I can schedule a capture job for the same device and have each
    capture of that device go in their own unique sub-directory automatically so that I have an audit trail for that device? I don’t want the capture to overwrite the previous build.

    If Thursdays dev build of the device is garbage, I can image with Tuesdays build that was automatically captured the same week. Snapshots in a way but full drive captures.

    Chris

  • Senior Developer

    @wayne-workman said in Fog for Dev - Save each capture in its own folder automatically.:

    Research about FOG’s post download scripts.

    Sorry but those are only run on deploy, not on capture.


  • @cyannella said in Fog for Dev - Save each capture in its own folder automatically.:

    How do I launch rsync myself with the parameters after FOG captures the device image?

    Research about FOG’s post download scripts. This should get you started: https://forums.fogproject.org/topic/7740/the-magical-mystical-fog-post-download-script

    You could also hook into web calls for when the image capture reports it is complete. Could do a one-liner exec statement in the php, and any number of more-fancy things.

    Maybe the solution is simpler. maybe a clever bash script that runs within cron to do what you want with recent images. There is a DB with all the capture dates in it after all… python could do this too.


  • @cyannella

    I don’t know how keen you are on blowing up your dev environment, but if you run Xen or XCP-ng for your environment. XenOrchestra has a huge number of backup options which would probably meet your need. They wouldn’t be FOG images, but they would be VM backups that could be restored, and depending on how you choose to go forward with the backups you can even pull individual files out.


  • @sebastian-roth said in Fog for Dev - Save each capture in its own folder automatically.:

    No, this is not something FOG does out of the box. While I can see the use case for this it’s kind of rare as most users would not have enough space for a history of the image.
    I am not saying it’s impossible to add this feature to FOG but it’s not on our list (which is long and the dev team quite small). So if you are really keen you can dive into this topic and work on it.

    Totally get it. Limited Dev team here as well but we are all over the place.
    How do I launch rsync myself with the parameters after FOG captures the device image?

    Capture done, rsync Tuesdays capture to Tuesdays folder that lives… here.

  • Senior Developer

    @cyannella No, this is not something FOG does out of the box. While I can see the use case for this it’s kind of rare as most users would not have enough space for a history of the image.

    I am not saying it’s impossible to add this feature to FOG but it’s not on our list (which is long and the dev team quite small). So if you are really keen you can dive into this topic and work on it.

284
Online

8.1k
Users

15.0k
Topics

141.3k
Posts