Announcement

Collapse
No announcement yet.

NFS and Backups

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • NFS and Backups

    Is it possible to change the location of where siteworx backups are made and store them on an NFS mount if possible?

  • #2
    Hi Bertie

    I believe it could be changed but you maybe better just to rsync the backup to your nfs drive

    Iw has nfs as an option, which you could even move your /home directory to,

    Many thanks

    John

    Comment


    • #3
      Originally posted by d2d4j View Post
      Hi Bertie

      I believe it could be changed but you maybe better just to rsync the backup to your nfs drive

      Iw has nfs as an option, which you could even move your /home directory to,

      Many thanks

      John
      Is it possible to have like a /home2 so any new accounts would be stored on the /home2 directory instead then?

      Comment


      • #4
        Hi Bertie
        Many thanks, if I understand correctly, you want to create a new hosting folder called /home2 for any new accounts and leave the old hosting folder called /home, which is currently used for any previous siteworx accounts existent.
        The answer as far I understand it, would be no sorry
        Are you running out of space on the /home folder
        You could, as I said, use your NFS drive as the /home folder and move your existent /home to your NFS
        I suppose you could attempt to do your question, but in a lsightly different way, and that is rename the current /home to /home2, create a new /home (setting the perms etc correctly), and then you would have to manually change all the current vhost files paths to /home2 from /home.
        This is something I have not tried, and most likely could see potential issues by doing this, eg webmail, mail etc, so do so at your own risk
        I hope that helps
        Many thanks
        John

        Comment


        • #5
          Hi Bertie

          Sorry a thought which might work, could you symlink backup folder to your nfs

          It would need fully testing though

          Many thanks

          John

          Comment


          • #6
            Coming back to this - Is it actually possible to change the backup location for all of the SiteWorx accounts? We want to store the backups on an NFS share. I know they are all seem to be stored within their own "domains" folder at the moment?

            Comment


            • #7
              Hi Bertie
              Many thanks and I would probably open a support ticket to ask, been the best advice.
              I do believe it is possible though, with a little work from from yourself (see below) and you could script a cron job to backup as needed, and include the exact position of the backup made (note the option for backup location -o --output-dir (optional) value The directory where the completed backup will be saved.).
              I hope that helps a little
              Many thanks
              John
              ./backup.pex
              --domains parameter is required
              Usage: backup.php [-tofescb --all --compression --databases --email --exclude-exts --ftp --mail --no-disabled --quiet --reseller-id --siteworx --structure-only --web --xfer-bg --xfer-ini --xfer-method] < --domains>
              --all (DEPRECATED) Specifies a full backup of
              the SiteWorx account. This option is
              deprecated, and --backup-options should be
              used instead. This is here for backwards
              compatibility, and will be removed in a
              future release.
              -b --backup-options (optional)values Set what we should be backing up: (web =
              website files, mail = e-mail messages, db
              = database data, all = all of the above,
              no-logs = do not backup log files,
              no-stats = do not backup stats files,
              no-mail-content = do not backup mail
              messages, DEFAULT: all
              -c --chunk (optional)value The chunk number to process during the
              current run of the backup script
              (1)
              -s --chunksize (optional)value The number of backups to do during this
              run of the backup script.
              (200)
              --compression=<value> Compression level used when compressing
              final archive (6)
              --databases (DEPRECATED) include database data in the
              backup file. This option is deprecated,
              and --backup-options should be used
              instead. This is here for backwards
              compatibility, and will be removed in a
              future release.
              --domains values(1-...) The domain or list of domains to backup.
              You may enter multiple domain names
              separating them by spaces.You can also use
              a regular expression string to match
              multiple domain names (i.e. --domain
              "^iworx\.(.*)$")
              --email=<value> Backup status will be emailed to this
              address ()
              -e --exclude-dirs (optional)values A list of directories to exclude from
              thebackup, that may have been included
              normally.This path is relative to the
              webroot.(i.e., --exclude-dirs
              html/this/dir/)
              --exclude-exts (optional)values A list of extensions to exclude from
              thebackup, that may have been included
              normally.(i.e., --exclude-exts jpg gif)
              -f --filename-format=<value> Format of filename output: %D=domain name,
              %T=unix timestamp, %U = unix username, %R
              = reseller id, %t = backup type (full or
              partial), %H = hour, %M = minute, %S =
              second, %m = month (1..12), %d = day of
              month (1..31), %a = 3-letter day of week
              (Sun..Sat), %Y = 4-digit year
              --ftp (DEPRECATED) Indicates the backup file
              should be transferred via FTP. This
              option is deprecated, and --xfer-method
              should be used instead. This is here for
              backwards compatibility, and will be
              removed in a future release.
              --mail (DEPRECATED) include mail data in the
              backup file. This option is deprecated,
              and --backup-options should be used
              instead. This is here for backwards
              compatibility, and will be removed in a
              future release.
              --no-disabled Do not backup any domains that are
              disabled/inactive.
              -o --output-dir (optional)value The directory where the completed backup
              will be saved.
              ()
              --quiet (DEPRECATED) Specifies that a backup
              process should run quietly (no output).
              This option is deprecated, redirecting
              output to /dev/null should be used
              instead. This is here for backwards
              compatibility, and will be removed in the
              future
              --reseller-id (optional)value The id of the reseller (1)
              --siteworx (DEPRECATED) Specifies that a full backup
              should be stored in the default location.
              This option is deprecated, and simply
              omitting this option should be used
              instead. This is here for backwards
              compatibility, and will be removed in a
              future release.
              --structure-only Create a structure only backup. No data
              files will be backed up, only the manifest
              XML file will be created. This is useful
              for very large backupswhere moving the
              data manually would be easier.Can NOT be
              set along with 'backup-options' parameter
              -t --tmp-dir (optional)value The temporary directory where the backup
              will be created before the backup is moved
              into the finallocation.
              (/tmp)
              --web (DEPRECATED) include web data in the
              backup file. This option is deprecated,
              and --backup-options should be used
              instead. This is here for backwards
              compatibility, and will be removed in a
              future release.
              --xfer-bg Tells backup.pex to transfer the backup
              file in the background. Default behavior
              is to transfer in the foreground.
              --xfer-ini (optional)value Sets the transfer ini file to be used by
              the backup process.
              ()
              --xfer-method (optional)value Sets how the backups should be transfered
              to their final locations. Valid values
              are 'scp' or 'ftp'.If this option is not
              set, the backups will be saved locally to
              the hard drive, in the location specified
              with the the --output-dir parameter.
              ()

              Comment


              • #8
                Anyone know if the command line backup script is limited to doing 50 accounts an hour? Or is that related to the default compression level.

                Comment


                • #9
                  Hi Bertie

                  My initial thought is your correct, it is not limited to the number but to the volume of space/compression

                  It could be that one or more of your sites are large

                  Many thanks

                  John

                  Comment


                  • #10
                    Originally posted by d2d4j View Post
                    Hi Bertie

                    My initial thought is your correct, it is not limited to the number but to the volume of space/compression

                    It could be that one or more of your sites are large

                    Many thanks

                    John
                    Yeah, we have the compression set to 1 and it still only does 50 accounts an hour by the looks of it.

                    Comment


                    • #11
                      I'm trying to get a script to run via cron for these backups to be made on an NFS share.

                      This is what I have in the .sh file:

                      #!/bin/bash
                      PATH=$PATH:/home/interworx/bin
                      backupdate=`date +%Y-%m-%d_%H%M%S`
                      mkdir -p /ipanelbackup/$backupdate
                      ./home/interworx/bin/backup.pex --compression 1 --domains all --tmp-dir /ipanelbackup/tmp --output-dir /ipanelbackup/$backupdate --email *email removed* > /tmp/backuplog_$backupdate.log

                      When the cron runs, it makes the folder with the current date etc. But then no backups are actually being made and placed inside the folder? Anyone can help to see where I have been going wrong?

                      Comment


                      • #12
                        Hi Berie
                        Many thanks for your post, and it is something I havenever tried but I can conform it works lovely on our test server, with backups been made to an NFS drive
                        I think you have the wronf path for iworx/bin, and I think you may not need the drive date stamps etc... so please try this as below (please change your values to match your servers)
                        #!/bin/bash
                        /usr/local/interworx/bin/backup.pex --compression 1 --domains all --tmp-dir /ipanelbackup/tmp --output-dir /ipanelbackup/$backupdate --email *email removed* > /tmp/backuplog_$backupdate.log
                        You may just want to test using 1 domain and not all, for quickness to confirm it works, if so, it is as below (replace mytestdomain.url with an actual domain on your server)
                        #!/bin/bash
                        /usr/local/interworx/bin/backup.pex --compression 1 --domains mytestdomain.url --tmp-dir /ipanelbackup/tmp --output-dir /ipanelbackup/$backupdate --email *email removed* > /tmp/backuplog_$backupdate.log
                        If this still fails, double check your NFS folder, on our test server, we set nfsback as a test NFS drive, so you need to make sure you have full access to the drive
                        I hope that helps a little
                        Many thanks
                        John

                        Comment


                        • #13
                          Originally posted by d2d4j View Post
                          Hi Berie
                          Many thanks for your post, and it is something I havenever tried but I can conform it works lovely on our test server, with backups been made to an NFS drive
                          I think you have the wronf path for iworx/bin, and I think you may not need the drive date stamps etc... so please try this as below (please change your values to match your servers)
                          #!/bin/bash
                          /usr/local/interworx/bin/backup.pex --compression 1 --domains all --tmp-dir /ipanelbackup/tmp --output-dir /ipanelbackup/$backupdate --email *email removed* > /tmp/backuplog_$backupdate.log
                          You may just want to test using 1 domain and not all, for quickness to confirm it works, if so, it is as below (replace mytestdomain.url with an actual domain on your server)
                          #!/bin/bash
                          /usr/local/interworx/bin/backup.pex --compression 1 --domains mytestdomain.url --tmp-dir /ipanelbackup/tmp --output-dir /ipanelbackup/$backupdate --email *email removed* > /tmp/backuplog_$backupdate.log
                          If this still fails, double check your NFS folder, on our test server, we set nfsback as a test NFS drive, so you need to make sure you have full access to the drive
                          I hope that helps a little
                          Many thanks
                          John

                          Changing the path of the backup.pex to: /usr/local/interworx/bin/backup.pex made it work.

                          Cheers for the input

                          Comment

                          Working...
                          X