Skip to content

Commit

Permalink
Remvoal of temp dir evs-temp and add uname to acl backup file. This will
Browse files Browse the repository at this point in the history
be version 1.1

A temp directory evs-temp is created in the location from which the
script is run. This will be removed as part of the cleanup

Also added uname after replacing spl chars with '_' to the acl backup
filename in case mutliple accounts exist
  • Loading branch information
nsmathew committed Jan 12, 2014
1 parent 1cb0d07 commit 06615c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions idrive-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@ backup_ACL(){
echo "ERROR:`eval ${TIMESTMP_CMD}`: 'getfacl' command is not available. ACL backup will not be performed" | tee -a "${LOG_FILE}"
return
fi
filename="${ACL_BACKUP%/}"/idrive-acls-${TIMESTMP}.txt
converted_uname=`echo "${USERID}" | sed 's/[^a-zA-Z0-9]/_/g'` #Remove the spl chars and replace with '_'
filename="${ACL_BACKUP%/}"/${converted_uname}-acls-${TIMESTMP}.txt # Adding uname to filename incase of multiple accounts
PTH=""
cat $1 | while read PTH; do

Expand Down Expand Up @@ -591,7 +592,8 @@ data_size_interpreter(){
# RETURNS: Exit status to shell
#-------------------------------------------------------------------------------
clean_up_exit(){
rm -fr ${WORKDIR}
rm -fr ./evs_temp/ #Temp directory created by idevsutil
rm -fr ${WORKDIR} #Temp directory created for file/folder list
exit $1
}

Expand Down
2 changes: 1 addition & 1 deletion idrive-wrapper_manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ This will be the parent folder to which the data for upload will be uploaded wit

ACL_BACKUP
Path to which the ACL info for the current list of files/folders being uploaded should be saved. This should be a valid path(program will not create it). If not valid or not provided then no ACL backup will be taken. A
new file is created for every upload run and has the timestamp in the filename. Same file will be used for one execution when both -u and -U options are given. IDrive does not save file metadata like
new file is created for every upload run and has the timestamp and the user id in the filename. Same file will be used for one execution when both -u and -U options are given. IDrive does not save file metadata like
permissions/owner/group. So as part of restore, after downloading required data from IDrive this ACL backup file can be used to restore the metadata. The path in the backup file will have to be changed to reflect the
download location. It is recommended to include this ACL backup directory in your list of folders to be backed up. getfacl is used to backup the ACLs and should be available in the system for backup to work. setfacl can
be used to restore them. Refer to 'man setfacl' for more information.
Expand Down

0 comments on commit 06615c0

Please sign in to comment.