• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Backup Feature for user profiles/Data

    Scheduled Pinned Locked Moved
    Tutorials
    6
    12
    7.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Lee RowlettL
      Lee Rowlett Developer
      last edited by

      Hi All,

      just to let you know i’ve successfully been able to backup users profile before imaging.

      FOG takes a direct copy of doc and settings (xp) or users (win7/8) - images the machine then pulls the backup back down to the newly machine under root C:\MachineName-UserBackup

      helps not to lose data if no folder redirection is setup. if anyone interested i can post the mods you need to make to the init.gz…

      also if considered for main fog code was thinking maybe have a tick box under host to say whether to choose whether to backup or not. thoughts?

      1 Reply Last reply Reply Quote 0
      • Lee RowlettL
        Lee Rowlett Developer
        last edited by

        .

        1 Reply Last reply Reply Quote 0
        • M
          Matt Harding
          last edited by

          I have no particular use for this in the work environment as we use roaming profiles here but this sounds very positive for maybe home or small office setups… something that should be looked at in more depth definately. It sounds like it would be a marvelous option to have from the web control panel. Good work.

          1 Reply Last reply Reply Quote 0
          • C
            chad-bisd Moderator
            last edited by

            Is this done in the FOG client or in the FOG code in init.gz?


            If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

            1 Reply Last reply Reply Quote 0
            • Lee RowlettL
              Lee Rowlett Developer
              last edited by

              FOG Code in the init

              1 Reply Last reply Reply Quote 0
              • E
                ejbman
                last edited by

                [quote=“Lee Rowlett, post: 11887, member: 28”]FOG Code in the init[/quote]

                I would very much like to know the mods! This is exactly what I’ve been looking to do.

                1 Reply Last reply Reply Quote 0
                • E
                  ejbman
                  last edited by

                  And BTW, would love the ease of the tick box operation if considered for FOG code!

                  1 Reply Last reply Reply Quote 0
                  • Lee RowlettL
                    Lee Rowlett Developer
                    last edited by

                    it needs a little work but edit fog file within init.gz and add this code (you will need to create a folder on the server “/images/Backup”

                    and just add /amend every instance of:

                    [CODE]echo -n " * Waiting for disks to settle…";[/CODE]

                    to

                    [CODE]echo -n " * Waiting for disks to settle…";

                    echo “Done”;

                    echo -n " * Preparing users backup location…";

                    mkdir /ubackup

                    mount -o nolock,proto=tcp ${storage}Backup /ubackup

                    macWinSafe=echo $mac | sed 's/://g';

                    tmpuBackupPath=“/ubackup/$macWinSafe”;

                    if [ ! -d “$tmpuBackupPath” ]

                    then

                    mkdir -p “$tmpuBackupPath” 2>/dev/null;

                    fi

                    chmod -R 777 $tmpuBackupPath

                    rm -rf “$tmpuBackupPath/*”

                    parts=fogpartinfo --list-parts $hd 2>/dev/null;

                    for prt in $parts

                    do

                    win7partcnt=expr ${win7partcnt} + 1;

                    done

                    if [ “$win7partcnt” = “1” ]; then

                    part=“/dev/sda1”;

                    elif [ “$win7partcnt” = “2” ]; then

                    part=“/dev/sda2”;

                    elif [ “$win7partcnt” = “3” ]; then

                    part=“/dev/sda3”;

                    fi

                    echo “Done”;

                    echo -n " * Backing up user data…";

                    mkdir /ntfs &>/dev/null

                    ntfs-3g -o force,rw $part /ntfs

                    if [ “$type” = “down” -a “$osid” = “1” ]; then

                    mkdir -p ${tmpuBackupPath}/“Documents and Settings” 2>/dev/null;

                    chmod -R 777 ${tmpuBackupPath}/“Documents and Settings”

                    cp -rf /ntfs/“Documents and Settings/”* ${tmpuBackupPath}/“Documents and Settings” 2>/dev/null;

                    else

                    mkdir -p “${tmpuBackupPath}/Users” 2>/dev/null;

                    chmod -R 777 ${tmpuBackupPath}/Users

                    cp -rf /ntfs/Users/* ${tmpuBackupPath}/Users 2>/dev/null;

                    fi

                    echo “Done”;

                    umount /ubackup;

                    umount /ntfs;
                    [/CODE]

                    1 Reply Last reply Reply Quote 0
                    • Lee RowlettL
                      Lee Rowlett Developer
                      last edited by

                      so now need to pull the data back down after imaging done so then after:
                      echo " * Database updated!";
                      echo “”;
                      fi
                      clearScreen;

                      add this:
                      [CODE]echo -n " * Mounting users backup location…";

                      mkdir /ubackup

                      echo “Done”;

                      mount -o nolock,proto=tcp ${storage}Backup /ubackup

                      echo -n " * Downloading user data backup…";

                      mkdir -p /ntfs/UserBackup 2>/dev/null;

                      mv ${tmpuBackupPath}/Users /ntfs/UserBackup

                      rm -rf /ubackup/*

                      echo “Done”;
                      [/CODE]

                      1 Reply Last reply Reply Quote 0
                      • C
                        chad-bisd Moderator
                        last edited by

                        Can you update your posts above to use the CODE tags around the code, and if possible include approximate line numbers of where to begin?

                        Awesome job.


                        If you would like to make a donation to the Fog project, please do so [U][COLOR=#0000ff][URL='http://sourceforge.net/dona…

                        1 Reply Last reply Reply Quote 0
                        • S
                          sysfs
                          last edited by

                          I’m pretty new to this whole thing. I’ve got my system up and running and would like to add this as a feature but I’m unsure how to edit the init.gz code. I pulled down /tftpboot/fog/images/init.gz and unzipped it but I cant find the code that I am supposed to edit. I assume that means I have grabbed the wrong init.gz but I’m not sure which one I should be grabbing. Any help would be greatly appreciated.

                          1 Reply Last reply Reply Quote 0
                          • Tom ElliottT
                            Tom Elliott
                            last edited by

                            sysfs,

                            You also have to mount it.

                            The gzip is ext2 formatted file/filesystem.

                            The way you edit is to perform these tasks:

                            First unzip, as you already know how but just for clarity sake:
                            [code]cd /tftpboot/fog/images
                            gunzip init.gz[/code]

                            Then make another directory and mount it like a filesystem:
                            [code]mkdir tmp
                            mount -o loop init tmp
                            [/code]

                            Then cd into the tmp folder and you’ll see all the scripts and the “Root” filesystem fog uses. Most of the scripts are in the bin folder so:
                            [code]
                            cd tmp/bin
                            [/code]

                            Then you can edit all the scripts you need to.

                            When you’re all complete perform these tasks:

                            [code]
                            cd /tftpboot/fog/images
                            umount tmp
                            gzip -9 init
                            [/code]

                            You should, then, have successfully customized your init.gz file.

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post

                            199

                            Online

                            12.0k

                            Users

                            17.3k

                            Topics

                            155.2k

                            Posts
                            Copyright © 2012-2024 FOG Project