View on GitHub

Aspxzipit-installer

Rackspace CloudSites content and MSSQL backup utility. Rackspace Cloud API KEY required for use.

Download this project as a .zip file Download this project as a tar.gz file

ASPXZipIt-Installer

This is a self install tool for Rackspace CloudSites IIS customers to allow for backing up of their web content and MSSQL database to their CloudFiles account.

Installer supports both .NET 3.5, .NET 4.0, and .NET 4.5 without any modification necessary. Compression for .NET 3.5/4.0 is made possible for through the DotNetZip Library.

For access to compiled versions of ASPXZipIt for manual install please see the following:

ASP.NET 3.5: http://onesandzeros415.github.com/ASPXZipIt-NET35/
ASP.NET 4.0 http://onesandzeros415.github.com/ASPXZipIt-NET40/
ASP.NET 4.5 http://onesandzeros415.github.com/ASPXZipIt-NET45/

Instructions:

Step 1. Download zip or tar from above.
Step 2. Uncompress your zip or tar locally on your computer.
Step 3. Upload ASPXZipIt-Installer.aspx to the root of your web site: \fs4-n01\stor3wc2dfw1\xxx\www.yourdomain.com\web\content\ASPXZipIt-Installer.aspx
Step 4. Impersonation must be enabled for Installer to work. Please see this article for more information. Edit your web.config and add the following if you do not already have:

<configuration>
<system.web>
<identity impersonate="true" userName="dfw\USERNAME" password="PASSWORD" />
</system.web>
</configuration>

<configuration>
<system.web>
<identity impersonate="true" userName="ord\USERNAME" password="PASSWORD" />
</system.web>
</configuration>

Step 5. In ftp navigate to \fs4-n01\stor3wc2dfw1\xxx\www.yourdomain.com\web\ and right click the content directory and apply a permission set of 770.
Step 6. Open a browser and browse to ASPXZipIt Installer: www.yourdomain.com/ASPXZipIt-Installer.aspx
Step 7. Click the rebuild application button to trigger a recompilation of your site to ensure impersonation and permission changes have taken affect.
Step 8. Select your .NET version 3.5 or 4.0
Step 9. Enter your CloudFiles API Username and API Key which will be stored in the following location: \fs4-n01\stor3wc2dfw1\xxx\www.yourdomain.com\web\content\aspxzipit\
Step 10. Enter a username and password to protect ASPXZipIt from outside users.
Step 11. Click install ASPXZIPIT
Step 12. In ftp navigate to \fs4-n01\stor3wc2dfw1\xxx\www.yourdomain.com\web\content\aspxzipit\ and edit the following values in the Web.config file:

<add key="CloudFilesUserName" value="USERNAME GOES HERE" />
<add key="CloudFilesApiKey" value="APIKEYGOES HERE" />

Step 13. In ftp set your content directory permissions to 770. To do this navigate to \fs4-n01\stor3wc2dfw1\xxx\www.yourdomain.com\web\content\ with your preferred FTP program and apply a permission set of 770.
Step 14. Browse to ASPXZipIt and Begin backing up your site: www.yourdomain.com/aspxzipit

MSSQL Backup Utility:

Things to note:

MSSQL Server must be setup to write to a share with appropriate permissions in place. The utility essentially has mssql write a backup file to disk and then IIS zips and uploads to CloudFiles.

In order to use the MSSQL Backup Utility please be sure to install the following stored procedure:

Step 1. To install a stored procedure open up SSMS (SQL Server Management Studio)
Step 2. Select New Query in the upper right hand corener.
Step 3. In the query window enter the following:


set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[FullBackup]
@FileName nvarchar(256)
AS
BEGIN

SET NOCOUNT ON;

BACKUP DATABASE [123456_YourDatabase] TO DISK = @FileName WITH COPY_ONLY, NOFORMAT, NOINIT, NAME = N'Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

END

Note: You skip to step 5 if you use the Install Stored Procedure Button.

Step 4. Be sure to enter your actual database name where [123456_YourDatabase] is.
Step 5. Hit Execute to install the query.
Step 6. You can now backup your databse to Rackspace CloudFiles.