Implementing Secure and Efficient File Sharing Solutions for Geographically Dispersed Offices
Tags: programming, beginners, azure, cloudcomputing
Published: 2023-12-04 21:17:48

## How to establish and set up an Azure Files storage account.
- In the market place search for storage account and select create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vp1c54qijr0m1ndbjkup.png)
- In the project details, select the resource group you just created
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m2eq3f1fnh08vr5gwicn.png)
- Under the instance details, supply the name for your storage account. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/11jorex44mu1qwk97mkp.png)
- Change performance to Premium
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/29mtrvks8xvlbw9o1edu.png)
- Change Premium account type to File shares
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/inyib763ni6slnl9ktap.png)
- Select Zone-redundant storage in the redundancy drop down
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24ccyxquap6tt31fc03u.png)
- click review
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/41cebig89sh5ezh4zcz7.png)
- Click create after passing validation
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmmbe07yqyfewxqe5407.png)
- Wait for it to deploy
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6v6iznucpcpqqwaytc32.png)
- Click Go to resource
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h8qiaa9stxs8nva0wi6e.png)

## How to establish and set up a directory-based file share.
- Select File shares in the Data storage section
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cg6vzrwka181zphy6qsk.png)
- Click + File share
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vkajb5s4h6marnhy7mqc.png)
- Provide a name for the new file share
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5shr7zxszpq2wg0nwbs.png)
- Leave other settings as default and click review + create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kepihz6lw69lp8km8mrd.png)
- Once validation is passed, click create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69l0l48y962hmwzkl2oe.png)

## How to include a directory in the shared file. 
- Click + Add directory in the file share overview page
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x57v2w9k58qos5l6n0wf.png)
- Type the name for your directory and click ok
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/21s9kg9qr2d4e3hexspw.png)
- Select Browse in the overview section
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8t3cs44ktem66yhxcmq.png)
- Select the newly created directory
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cn5ojf8rc5t3yh6kyga1.png)
- Click upload, select browse for file and then click upload again
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pr9v8w36wah0hzc62vq5.png)
- Your file will be displayed under your directory
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gjcmltcswd5bajo72y0b.png)

## How to Set up and check snapshots.
-In the file share overview page, select snapshot under operation section
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b8tlz4kha8opixg3pz42.png)
- Click + Add snapshot
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nerwbjttj31oof0wxybr.png)
- Note that the comment is optional. Click Ok
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cqveci9svauake846pld.png)
- Click the snapshot and verify that both the directory and the uploaded file are included
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0r3chee2sbylr2l16h7f.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m894bhgdtmatswnjfbdm.png)

## Practice restoring a file using snapshots.
- Go back to the file share, in the overview page, click browse
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sh4amttdr3m9vylv0a6s.png)
- Click on the uploaded file and and click delete in the file properties
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0oxaycu992inxtc7opdv.png) 
- Click yes to confirm delete
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/14wosx09yioy1vwwrx7o.png)
- Click snapshot in the operations section
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apmgsdkppxc7r30z661k.png)
- Select the snapshot created before
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q584hi3nbpbb2mo700km.png)
- Click on the file you want to restore and click restore
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lqeoflcrusk7ct7lv1dx.png)
- Supply a restored file name and click Ok
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a764wqn3y7glzltlbcn2.png)
- You can verify the restored file by navigating to your directory to check by clicking browse.

## How to set up a storage access restriction to only certain virtual networks.
- Search for virtual network and click create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q7sf2n2pzld0ctc3g5mr.png)
- Fill in the project details which comprises of Subscription and Resource group
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jjwdostnqn68vy0z9s5a.png)
- Provide a name for your virtual network and leave other parameters as default
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rtzype61rpcphs8alxjp.png)
- Click review + create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4r6vvuwxu1m11tiu99gw.png)
- Click create once validation is passed
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmab3ode5qmc443k0qud.png)
- Once the deployment is complete, click go to resource
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dvga9fv4gp1qd5mxqstw.png)
- Under settings section, click subnets
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iwkt64jr4v7v7pmz25x5.png)
- Click default subnet
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i8qdmj339hsilkzwbn7l.png)
- Tick Microsoft.Storage in the services drop-down under service endpoints section, leave other settings as default and click save
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f4gbnly21npg4xkzf15x.png)

## How to access the storage account through the virtual network you just established.
- Go back to the files storage account and select Networking under Security + networking, select Enabled from selected virtual networks and IP addresses under public network access
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aqylseob0t5s85xr8w0a.png)
- Click Add existing virtual network under virtual network and click the drop-down under virtual network.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5waezdmtyt983coisn7b.png)
- Tick your virtual network
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kvygm6ytvrb98w5k3xgt.png)
- Tick your subnet
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3e929s5t19p2v523b2ub.png)
- Then click Add
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kplq205mfxkhmhvgvrfk.png)
- Select Storage browser
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gvpmutukxtd5u4vip1da.png)
- Click File share
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eunwnkcczr64wgncm7o8.png)
- Click the file under file share
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z77irplhbm32t82no8qj.png)
- A pane showing This request is not authorized indicates that you are not connecting from the virtual network.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/onamc5kwyk8rqmh8vmbb.png)