• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Bristow 0
    B
    • Profile
    • Following 0
    • Followers 0
    • Topics 15
    • Posts 59
    • Best 7
    • Controversial 0
    • Groups 0

    Bristow 0

    @Bristow 0

    Teacher and FOSS addict

    8
    Reputation
    1
    Profile views
    59
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Location Lyon - France

    Bristow 0 Unfollow Follow

    Best posts made by Bristow 0

    • RE: Script for a backup ?

      Thanks a lot @rodluz !

      I took your script and adapted it. I use it directly on my FOG server, which simplifies things a bit. I also changed the mail to a notification sent to my smartphone with ntfy, which I find easy to use.

      I also mounted my NAS share in NFS directly on /mnt/FOGBackups.

      Here’s my script:

      #!/bin/bash
      
      fogServerAddress="172.X.Y.Z"  # Change to actual FOG server address
      
      backupDate=$(date +"%Y%m%d")
      
      backupDir="/mnt/FOGBackups/$backupDate"
      backupDirImages="/mnt/FOGBackups/images"
      
      snapinLocation="/opt/fog/snapins"
      reportLocation="/var/www/fog/lib/reports"
      imageLocation="/images"
      
      failedBackupDB=0
      failedBackupSnapins=0
      failedBackupReports=0
      failedBackupImages=0
      
      [[ ! -d $backupDir ]] && mkdir -p $backupDir/{mysql,snapins,reports,logs} >/dev/null 2>&1
      [[ ! -d $backupDir/mysql || $backupDir/snapins || $backupDir/reports || $backupDir/logs ]] && mkdir -p $backupDir/{mysql,snapins,reports,logs} >/dev/null 2>&1
      
      backupDB() {
          wget --no-check-certificate --post-data="nojson=1" -O $backupDir/mysql/fog.sql "http://$fogServerAddress/fog/management/export.php?type=sql" 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup database!"
              failedBackupDB=1
          else
              echo "Database backed up."
          fi
      }
      
      backupSnapins() {
          cp -r $snapinLocation $backupDir/snapins/ 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup snapins!"
              failedBackupSnapins=1
          else
              echo "Snapins backed up."
          fi
      }
      
      backupReports() {
          cp -r $reportLocation $backupDir/reports/ 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup reports!"
              failedBackupReports=1
          else
              echo "Reports backed up."
          fi
      }
      
      backupImages() {
          rsync -auv $imageLocation $backupDirImages 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup images!"
              failedBackupImages=1
          else
              echo "Images backed up."
          fi
      }
      
      checkForFailures() {
          echo "Running checkForFailures()"
          if [[ $failedBackupDB -eq 1 ]]; then
              message="$message \nFailed to backup database."
          fi
      
          if [[ $failedBackupSnapins -eq 1 ]]; then
              message="$message \nFailed to backup snapins."
          fi
      
          if [[ $failedBackupReports -eq 1 ]]; then
              message="$message \nFailed to backup reports."
          fi
          if [[ $failedBackupImages -eq 1 ]]; then
              message="$message \nFailed to backup images."
          fi
      }
      
      sendNotif() {
      	echo "Running sendNotif()"
          if [[ ! -z $message ]]; then
              {
                  curl -d "FOG Backup Failed\n $message" ntfy.sh/XYZATEHFJICH
      		}
      	else
      		curl -d "FOG Backup Successful!" ntfy.sh/XYZATEHFJICH
      	fi
      }
      
      backupDB
      backupSnapins
      backupReports
      backupImages
      
      checkForFailures
      sendNotif
      
      
      posted in General Problems
      B
      Bristow 0
    • Small errors in migration commands

      I have just migrated a Fog from one server to another and I noticed 2 small problems on this page: https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG#Arranging_Images

      The following command generates 2 messages :

      root@fogserver:~# mv /images/dev/* /images
      mv: Cannot move '/images/dev/dev' to '/images/dev': The folder is not empty.
      mv: Cannot move '/images/dev/postdownloadscripts' to '/images/postdownloadscripts': The folder is not empty.
      

      I don’t think it’s serious, is it?

      But this one is more annoying:

      root@fogserver:~# chown -R fog:root /images
      chown: incorrect user: " fog:root ".
      

      The fog user does not exist, it is fogproject. So I replaced by this command:

      chown -R fogproject:root /images
      

      Thanks for this amazing project !

      posted in General
      B
      Bristow 0
    • RE: [Solved] Grub rescue after deploy task

      @Sebastian-Roth you put me on the track!

      The bios was configured in legacy bios first, I switched to uefi first and it works!

      Thank you!

      posted in Linux Problems
      B
      Bristow 0
    • RE: Migrating FOG from a Optiplex 7010 to a dedicated server?

      @tesparza

      I made the same thing with this doc : https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG

      posted in General Problems
      B
      Bristow 0
    • RE: FOG Project call for engagement

      @lemeunier said in FOG Project call for engagement:

      PS: j’ai la flemme de traduire ça en anglais…

      Pourtant, cela prend 3 s avec https://www.deepl.com/translator

      Hello Sebastian, Hello Tom

      First of all, I would like to salute your work which is very helpful for us on a regional scale (Hauts-de-France, France).
      The development of FogProject systems is unquestionably irreproachable and indispensable for large structures such as ours.

      Have you thought about switching to a business model geared towards professionals, like WAPT?
      We would be delighted to collaborate with you in this context, and this would allow you to recruit developers in a paid way.

      Best regards.

      (Ne compliquons pas la vie des développeurs)

      posted in Announcements
      B
      Bristow 0
    • RE: Update french translation for Fog 1.5.9

      I have made good progress on the translation of FOG into French.

      There was a lot of work. Currently, I’m trying to translate directly in PoEdit but is there a solution to see my work in FOG, knowing that I installed FOG (dev-branch) on a VM…

      Thanks !

      PS : I should be able to push my file this week…

      posted in General
      B
      Bristow 0
    • RE: Translate the FOG project website

      @wayne-workman The Google translation of technical project is just awful. Deepl gives much better results.

      Besides, I hardly ever use Google and even less Google Chrome 😉

      I’m waiting for Tom’s answer 🙂

      posted in General
      B
      Bristow 0

    Latest posts made by Bristow 0

    • RE: LENOVO L13 : IPXE initialising Devices

      Same thing here with this laptop. We’ve also tested the experimental kernel but same problem.

      Thanks 🙂

      posted in Hardware Compatibility
      B
      Bristow 0
    • Store an image temporarily

      Hello everyone!

      I’m going to need to clean up my storage space and I’d like to know if it’s possible to temporarily store image files to free up space?

      My idea:

      • I take a screenshot of my image parameters,
      • I assign another image to the PCs using this image to store elsewhere (or maybe I can leave this assignment anyway)
      • move the image folder contained in /images
      • delete the image from FOG

      As soon as I can, I do the opposite:

      • move the image folder to /images
      • recreate the image in FOG with my saved settings,
      • reassign the image to the PX.

      Will this work?

      Thank you for your help 🙏

      posted in General
      B
      Bristow 0
    • RE: ProBook 450 G9 slow to image

      I have very good news.

      While analyzing the chipset of the network card, I realized that it was an Intel (and not a realtek) I219-LM and that it was an old chipset.

      So I downloaded the bzImage 5.15.98 kernel and made it available in the appropriate folder on the FOG server, calling it bzImage_5.15.98.

      Then, in the host description, I put bzImage_5.15.98 in front of the machine kernel.

      And oh magic, everything went back to the way it was before 13 GB/mn

      posted in Hardware Compatibility
      B
      Bristow 0
    • RE: ProBook 450 G9 slow to image

      Hello

      I’m experiencing the same problem with HP ProTower G9, but with the added bonus of randomness 😞

      I’m using Fog 1.5.9 and kernel 5.10*.

      The first PC, I deploy an image very quickly but it freezes at the end, perhaps a network cut. Impossible to restart the deployment, it deploys at 5Mb / min or something like that.

      2nd identical PC, I deploy the image at high speed. I modify it and capture it just as quickly.

      3rd identical PC, impossible to bring the image down quickly. I decide to update the Linux kernel to version 6.1.63. There’s some improvement, it’s stable between 400 and 600 MB/min. It’s not as fast as my previous deployments.

      I don’t know what to do to improve this knowing that I have to deploy 13 other new PCs by Wednesday.

      Thank you all for this tool that I love!

      posted in Hardware Compatibility
      B
      Bristow 0
    • My cloned PCs won't boot into WOL

      Hi !

      I cloned some Linux Mint Una PCs with FOG and everything went fine.
      Now I’d like to use the wake on lan feature to turn them on remotely and do updates on them.

      The problem is that while the PCs start up fine when I switch them on normally, when I switch them on via WOL, they launch the FOG menu and after 3s switch to Boot From Hard Disk. From then on, the PC displays a cursor on an all-black screen. So the PC can’t boot normally.

      Do you have any ideas for solving this problem?

      Thanks for your help!

      posted in Linux Problems bootmenu
      B
      Bristow 0
    • RE: Script for a backup ?

      Thanks a lot @rodluz !

      I took your script and adapted it. I use it directly on my FOG server, which simplifies things a bit. I also changed the mail to a notification sent to my smartphone with ntfy, which I find easy to use.

      I also mounted my NAS share in NFS directly on /mnt/FOGBackups.

      Here’s my script:

      #!/bin/bash
      
      fogServerAddress="172.X.Y.Z"  # Change to actual FOG server address
      
      backupDate=$(date +"%Y%m%d")
      
      backupDir="/mnt/FOGBackups/$backupDate"
      backupDirImages="/mnt/FOGBackups/images"
      
      snapinLocation="/opt/fog/snapins"
      reportLocation="/var/www/fog/lib/reports"
      imageLocation="/images"
      
      failedBackupDB=0
      failedBackupSnapins=0
      failedBackupReports=0
      failedBackupImages=0
      
      [[ ! -d $backupDir ]] && mkdir -p $backupDir/{mysql,snapins,reports,logs} >/dev/null 2>&1
      [[ ! -d $backupDir/mysql || $backupDir/snapins || $backupDir/reports || $backupDir/logs ]] && mkdir -p $backupDir/{mysql,snapins,reports,logs} >/dev/null 2>&1
      
      backupDB() {
          wget --no-check-certificate --post-data="nojson=1" -O $backupDir/mysql/fog.sql "http://$fogServerAddress/fog/management/export.php?type=sql" 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup database!"
              failedBackupDB=1
          else
              echo "Database backed up."
          fi
      }
      
      backupSnapins() {
          cp -r $snapinLocation $backupDir/snapins/ 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup snapins!"
              failedBackupSnapins=1
          else
              echo "Snapins backed up."
          fi
      }
      
      backupReports() {
          cp -r $reportLocation $backupDir/reports/ 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup reports!"
              failedBackupReports=1
          else
              echo "Reports backed up."
          fi
      }
      
      backupImages() {
          rsync -auv $imageLocation $backupDirImages 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup images!"
              failedBackupImages=1
          else
              echo "Images backed up."
          fi
      }
      
      checkForFailures() {
          echo "Running checkForFailures()"
          if [[ $failedBackupDB -eq 1 ]]; then
              message="$message \nFailed to backup database."
          fi
      
          if [[ $failedBackupSnapins -eq 1 ]]; then
              message="$message \nFailed to backup snapins."
          fi
      
          if [[ $failedBackupReports -eq 1 ]]; then
              message="$message \nFailed to backup reports."
          fi
          if [[ $failedBackupImages -eq 1 ]]; then
              message="$message \nFailed to backup images."
          fi
      }
      
      sendNotif() {
      	echo "Running sendNotif()"
          if [[ ! -z $message ]]; then
              {
                  curl -d "FOG Backup Failed\n $message" ntfy.sh/XYZATEHFJICH
      		}
      	else
      		curl -d "FOG Backup Successful!" ntfy.sh/XYZATEHFJICH
      	fi
      }
      
      backupDB
      backupSnapins
      backupReports
      backupImages
      
      checkForFailures
      sendNotif
      
      
      posted in General Problems
      B
      Bristow 0
    • RE: Script for a backup ?

      @falko Yes, I already clone my VM on a remote space. But if my clone isn’t correct, I lose everything.
      So I’d like a backup script that allows me to automate a database backup and an rsync to a remote share. You can never be too careful.

      posted in General Problems
      B
      Bristow 0
    • Script for a backup ?

      At present, I clone my proxmox virtual machine for my backups and from time to time, I manually run a dump of the database and images.

      I’d like to automate this backup via a cron. Do you have a script that allows me to :

      • database dump
      • rsync images to remote media

      Perhaps you have something better to suggest? Thanks 🙏

      posted in General Problems backup dump rsync
      B
      Bristow 0
    • RE: Deploy a VM on a physical computer?

      Thank you for your answers. I’ll give it a try and let you know!

      posted in Linux Problems
      B
      Bristow 0
    • Deploy a VM on a physical computer?

      To facilitate a one-day deployment of Linux workstations, I was wondering if I could prepare a LinuxMint VM, save it on FOG and then downgrade it to a physical workstation (several different ones).

      Will this work?

      posted in Linux Problems
      B
      Bristow 0