How do I properly backup AD Users, Groups and OUs?

60

A system state backup will back up AD. You can do this for free with the Windows Server Backup software that comes with your server.

The command line for that is:

wbadmin start systemstatebackup -backupTarget:<VolumeName>

The only "gotcha" is that the backup disk has to be something that the install DVD can see while booting, so I use things like 2TB external USB drives. (If it refuses one drive, it probably dislikes the partition size or block size. Try another.)

Once you have a system state backup, you can then restore the SBS server by booting off the install media, choosing recovery, and following the wizard. (You might want to test this process with a non-networked VM first.)

Good luck!

Share:
60

Related videos on Youtube

Pibben
Author by

Pibben

Updated on September 18, 2022

Comments

  • Pibben
    Pibben almost 2 years

    The C++ named requirement Compare require that the compare functions follow the strict weak ordering property. This is used for many standard library functions, for example std::sort.

    Many modern-day CPUs support Fused-Multiply-Add operations that computes a + b * c efficiently and without rounding the result of the multiplication. This implies that there are situations where the result from an FMA operation is different from separate multiply and add operations. FMA code generations for GCC is controlled by the -ffp-contract flag and is enabled by default.

    When the compiler generates FMA instructions in the compare function, there can arise a situation where the strict weak ordering property is (silently) no longer holding. This can cause std::sort and other functions to fail and crash on runtime.

    Consider the following example:

    struct S {
        double a;
        double b;
    };
    
    bool compare(const volatile S& s1, const volatile S& s2) {  // Volatile to prevent compile-time computations
        return s1.a * s1.b - s2.a * s2.b < 0.0;
    }
    
    int main() {
        const double a = 1 + 0x1.0p-52;
        const double b = 1 - 0x1.0p-52;
    
        volatile S s1{a, b};  // Volatile to prevent compile-time computations
        volatile S s2{1.0, 1.0};
    
        std::cout << compare(s1, s2) << '\n';
        std::cout << compare(s2, s1) << '\n';
    }
    

    The expected output would be

    1
    0
    

    However, on platforms supporting FMA (and when enabled, which again is default on GCC) the result is

    0
    0
    

    (GCC 11.2, -O3 -march=haswell)

    Clearly showing that the weak ordering property is not enforced does no longer hold.

    Why is this, potentially dangerous, feature enabled by default? What can be done to avoid this situation, besides disabling FMA code geneneration?

    • 463035818_is_not_a_number
      463035818_is_not_a_number over 2 years
      not sure if I understand the question. std::cout << ((s1.a*s1.b - s2.a*s2.b) == 0); prints 1 with or without -ffp-contract=off godbolt.org/z/vnz8qxnqo
    • Pibben
      Pibben over 2 years
      You need to have optimization enabled and a suitable architecture. I.e. -O3 -march=haswell
    • 463035818_is_not_a_number
      463035818_is_not_a_number over 2 years
      my point is that the flags make no difference, anything i tried results in (s1.a*s1.b - s2.a*s2.b) == 0. Though, as I already mentioned, the question is beyond my understanding
    • Pibben
      Pibben over 2 years
      I ran your code and switched between -O3 -march=haswell and -O3 -march=haswell -ffp-contract=off and saw differences in the output.
  • Pibben
    Pibben over 2 years
    Thanks for your reply. "Enforce" as a poorly chosen word from my side. I rather mean "does no longer hold". I will change it in my question.