• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Bristow 0
    • Profile
    • Following 0
    • Followers 0
    • Topics 19
    • Posts 75
    • Groups 0

    Bristow 0

    @Bristow 0

    Teacher and FOSS addict

    10
    Reputation
    2
    Profile views
    75
    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
      Bristow 0B
      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
      Bristow 0B
      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
      Bristow 0B
      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
      Bristow 0B
      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
      Bristow 0B
      Bristow 0
    • RE: Following a migration, character encoding issue

      @Tom-Elliott

      Great news!

      I updated my server to Debian Bookworm, restarted the Fog installation, and the accent problem disappeared. Awesome!

      Thanks for your help and happy new year 2026, all the best for the FOG project!

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

      @Tom-Elliott

      I’ve updated my FOG to the stable release and also updated my script with the following three lines, and everything’s fine – the database has been backed up successfully, it’s perfect!

      fogApiToken="XYZ=" 
      
      fogUsrToken="ZYF"
      
      curl -ik -X GET "http://$fogServerAddress/fog/system/export" -H "fog-api-token: $fogApiToken" -H "fog-user-token: $fogUsrToken" -o $backupDir/mysql/fog.sql 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
      

      Thanks again for all your hard work on the FOG project!

      posted in General Problems
      Bristow 0B
      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
      Bristow 0B
      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
      Bristow 0B
      Bristow 0

    Latest posts made by Bristow 0

    • RE: Script for a backup ?

      @Tom-Elliott

      I’ve updated my FOG to the stable release and also updated my script with the following three lines, and everything’s fine – the database has been backed up successfully, it’s perfect!

      fogApiToken="XYZ=" 
      
      fogUsrToken="ZYF"
      
      curl -ik -X GET "http://$fogServerAddress/fog/system/export" -H "fog-api-token: $fogApiToken" -H "fog-user-token: $fogUsrToken" -o $backupDir/mysql/fog.sql 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
      

      Thanks again for all your hard work on the FOG project!

      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Unable to update the database following an update

      Thanks @Tom-Elliott !

      Perhaps we could include a brief note stating that it is possible the database schema may not need updating.

      posted in FOG Problems
      Bristow 0B
      Bristow 0
    • Unable to update the database following an update

      Hello,

      Following this message from @Tom-Elliott , I have just started the FOG update.

      At the end, I’m asked to open a web browser to run this command:

      http://172.17.14.16/fog/management/index.php?node=schema&fogtoken=710a734290059211ee4542b4e5d7c403f5878ca9db78d7ef47d0e76074a838fe

      However, when I do so, nothing happens; I don’t get the prompt to update the database.
      Is this normal? I can’t remember which version I was on, but I was 134 commits behind on the stable branch.

      Also, I’m running in a VM, and I can’t copy and paste this line into a web browser, so I had to type the token in manually; but I’ve checked it several times without success.

      Can I press Enter to confirm without updating the database?

      Many thanks!

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

      @Tom-Elliott Thanks for your quick reply!

      Yes, I fully understand the need for security; in fact, it did surprise me (even though I don’t have any AD in my setup).

      I’ll be testing the command very soon and will get back to you (I’m not at my school at the moment). Do I need to upgrade the FOG server?

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

      I’m revisiting this script, which no longer works for backing up the database because authentication is now required.

      Is it possible to modify this line to include authentication? Or, quite simply, is there a way to back up the database via the command line?

      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
      

      Thanks in advance

      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Following a migration, character encoding issue

      @Tom-Elliott

      Great news!

      I updated my server to Debian Bookworm, restarted the Fog installation, and the accent problem disappeared. Awesome!

      Thanks for your help and happy new year 2026, all the best for the FOG project!

      posted in FOG Problems
      Bristow 0B
      Bristow 0
    • RE: Following a migration, character encoding issue

      @Tom-Elliott

      I’m on Debian Bullseye.

      I can’t install php-gettext, and i installed php-php-gettext (not installed), restart php7.4 but no better.

      posted in FOG Problems
      Bristow 0B
      Bristow 0
    • RE: Following a migration, character encoding issue

      Arghh 😞

      I tried to apply this command without any conclusive results:

      msgfmt -o /var/www/html/fog/management/languages/fr_FR.UTF-8/LC_MESSAGES/messages.mo /var/www/html/fog/management/languages/fr_FR.UTF-8/LC_MESSAGES/messages.po
      

      I did see the accents once or twice (after msgfmt command), but they disappeared after two clicks or connecting to Fog. Very strange…

      posted in FOG Problems
      Bristow 0B
      Bristow 0
    • RE: Following a migration, character encoding issue

      Maybe this is my translation file submitted a few years ago?

      https://github.com/FOGProject/fogproject/pull/431

      posted in FOG Problems
      Bristow 0B
      Bristow 0
    • RE: Following a migration, character encoding issue

      @Tom-Elliott

      Indeed, it worked before the migration.

      Accented characters work on the terminal connected to my server.

      However, it is strange that it displays the ç and the spanish ñ correctly on the home page. It seems that only the é and è are not working…

      Look :
      Capture d’écran du 2026-01-05 12-00-35.png

      posted in FOG Problems
      Bristow 0B
      Bristow 0