Skip to content

Commit 79a6737

Browse files
committed
feedback changes
1 parent 67af087 commit 79a6737

File tree

1 file changed

+77
-21
lines changed

1 file changed

+77
-21
lines changed

articles/databox/data-box-disk-file-acls-preservation.md

Lines changed: 77 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Preserving file ACLs, attributes, and timestamps with Azure Data Box Disk
3-
description: ACLs, timestamps, and attributes preserved during data copy to Azure Data Box. Copying metadata with Windows and Linux data copy tools.
3+
description: ACLs, timestamps, and attributes preserved during data copy to Azure Data Box Disk. Copying metadata with Windows and Linux data copy tools.
44
services: databox
55
author: alkohli
66

@@ -13,7 +13,7 @@ ms.author: alkohli
1313

1414
# Preserving file ACLs, attributes, and timestamps with Azure Data Box Disk
1515

16-
Azure Data Box Disk lets you preserve access control lists (ACLs), timestamps, and file attributes when sending data to Azure. This article describes the metadata that you can transfer when copying data to Data Box to upload it to Azure Files.
16+
Azure Data Box Disk lets you preserve access control lists (ACLs), timestamps, and file attributes when sending data to Azure. This article describes the metadata that you can transfer when copying data to Data Box Disk to upload it to Azure Files.
1717

1818
## Transferred metadata
1919

@@ -27,36 +27,92 @@ The subsequent sections of the article discuss in detail as to how the timestamp
2727

2828
## ACLs
2929

30-
<!--ACLs DEFINITION
31-
32-
**Transfer methods.** Support for ACLs transfer during a data copy varies with the file transfer protocol or service that you use. There are also some differences when you use a Windows client vs. a Linux client for the data copy.
30+
Depending on the transfer method used and whether you're using a Windows or Linux client, some or all discretionary and default access control lists (ACLs) on files and folders may be transferred during the data copy to Azure Files.
3331

34-
**Default ACLs.** Even if your data copy tool does not copy ACLs, in Windows, the default ACLs on directories and files are transferred to Azure Files. The default ACLs aren't transferred in Linux.
32+
> [!NOTE]
33+
> Files with ACLs containing conditional access control entry (ACE) strings are not copied. This is a known issue. To work around this, copy these files to the Azure Files share manually by mounting the share and then using a copy tool that supports copying ACLs.
3534
36-
The default ACLs have permissions for the built-in Administrator account, the SYSTEM account, and the SMB share user account that was used to mount and copy data in the Data Box.
35+
## Copying data and metadata
3736

38-
The ACLs contain security descriptors with the following properties: ACLs, Owner, Group, SACL.
39-
-->
37+
To transfer the ACLs, timestamps, and attributes for your data, use the following procedures to copy data into the Data Box.
38+
39+
### Windows data copy tool
40+
41+
To copy data to your Data Box via SMB, use an SMB-compatible file copy tool such as `robocopy`. The following sample command copies all files and directories, transferring metadata along with the data.
42+
43+
```console
44+
robocopy <Source> <Target> * /copyall /e /dcopy:DAT /B /r:3 /w:60 /is /nfl /ndl /np /MT:32 or 64 /fft /log+:<LogFile>
45+
```
46+
47+
where
48+
49+
|Option |Description |
50+
|------------------- | ----- |
51+
|`/copyall` |Copies all attributes.|
52+
|`/e` |Copies subdirectories, including empty directories. |
53+
|`/dcopy:DAT` |Copies data, attributes, and timestamps. Note: The /dcopy:DAT option must be used to transfer `CreationTime` on directories. |
54+
|`/B` |Copies files in Backup mode. |
55+
|`/r:3` |Specifies 3 retries on failed copies. |
56+
|`/w:60` |Specifies a wait time of 60 seconds between retries. |
57+
|`/is` |Includes the same files. |
58+
|`/nfl` |Does not log file names. |
59+
|`/ndl` |Does not log directory names. |
60+
|`/np` |Does not display progress of the copying operation. |
61+
|`/MT:32 or 64` |Uses multithreading, with 32 or 64 threads. |
62+
|`/fft` |Reduces time stamp granularity for any file system. |
63+
|`/log+:<LogFile>` |Appends the output to the existing log file.|
64+
65+
For more information on these `robocopy` parameters, see [Tutorial: Copy data to Azure Data Box via SMB](./data-box-deploy-copy-data.md)
4066

41-
Depending on the transfer method used and whether you're using a Windows or Linux client, some or all discretionary and default access control lists (ACLs) on files and folders may be transferred during the data copy to Azure Files.
42-
4367
> [!NOTE]
44-
> Files with ACLs containing conditional access control entry (ACE) strings are not copied. This is a known issue. To work around this, copy these files to the Azure Files share manually by mounting the share and then using a copy tool that supports copying ACLs.
68+
> If you use `/copyall` to copy your data, the source ACLs on directories and files are transferred to Azure Files. If you only had read-access on your source data and could not modify the source data, you'll have read-access only on the data in the Data Box Disk. Use `/copyall` only if you intend to copy all the ACLs on the directories and files along with the data.
69+
70+
#### Use robocopy to list, copy, modify files on Data Box Disk
71+
72+
Here are some of the common scenarios you'll use when copying data using `robocopy`.
73+
74+
- **Copy only data to Data Box Disk, no ACLs on directories and files**
75+
76+
Use the `/dcopy:DAT` option to only copy data, attributes, timestamps. ACLs on directories and files are not copied.
77+
78+
- **Copy data and ACLs on directories and files to Data Box Disk**
79+
80+
Use `/copyall` to copy all the source data including all the ACLs on directories and files.
81+
82+
- **List the filesystem on Data Box Disk using robocopy**
83+
84+
Use this command to list directory contents:
85+
86+
`robocopy <source-dir> NULL /l /s /xx /njh /njs /fp /B`
87+
88+
Note that the File Explorer doesn't allow you to list these files.
89+
90+
- **Copy or delete folders and files on Data Box Disk**
91+
92+
Use this command to copy a single file:
93+
94+
`robocopy <source-dir> <destination-dir> <file-name> /B`
95+
96+
Use this command to delete a single file:
97+
98+
`robocopy <source-dir> <destination-dir> <file-name> /purge /B`
99+
100+
In the above command, the `<source-dir>` should not have the file: `<file-name>`. Then, the above command syncs the destination with the source, resulting in the removal of the file from the destination.
45101

46-
### Default ACLs transfer
102+
Note that the File Explorer may not allow you to perform the above operations.
47103

48-
Even if your data copy tool doesn't copy ACLs, the default ACLs on directories and files are transferred to Azure Files when you use a Windows client. The default ACLs aren't transferred when you use a Linux client.
104+
For more information, see [Using robocopy commands](/windows-server/administration/windows-commands/robocopy).
49105

50-
The following default ACLs are transferred:
106+
### Linux data copy tools
51107

52-
- Account permissions:
53-
- Built-in Administrator account
54-
- SYSTEM account
55-
- SMB share user account used to mount and copy data in the Data Box
108+
Transferring metadata in Linux is a two-step process. First, you copy the source data using a tool such as `rsync`, which does not copy metadata. After you copy the data, you can copy the metadata using a tool such as `smbcacls` or `cifsacl`.
56109

57-
- Security descriptors with these properties: DACL, Owner, Group, SACL
110+
The following sample commands do the first step, copying the data using `rsync`.
58111

59-
[!INCLUDE [data-box-copy-data-and-metadata](../../includes/data-box-copy-data-and-metadata.md)]
112+
```console
113+
cp -aR /etc /opt/
114+
rsync -avP /etc /opt (-a copies a directory)
115+
```
60116

61117
## Next steps
62118

0 commit comments

Comments
 (0)