how to backup and restore file permissions using acl

$mkdir data
$cd data/
$ls
$pwd
/home/jeffrin/data
$echo hello > file1.txt
$echo world > file2.txt
$ls -l
total 8
-rw-r--r-- 1 jeffrin jeffrin 6 Jan 22 22:44 file1.txt
-rw-r--r-- 1 jeffrin jeffrin 6 Jan 22 22:44 file2.txt
$getfacl -R . > permissions.txt
$cat permissions.txt 
# file: .
# owner: jeffrin
# group: jeffrin
user::rwx
group::r-x
other::r-x

# file: permissions.txt
# owner: jeffrin
# group: jeffrin
user::rw-
group::r--
other::r--

# file: file1.txt
# owner: jeffrin
# group: jeffrin
user::rw-
group::r--
other::r--

# file: file2.txt
# owner: jeffrin
# group: jeffrin
user::rw-
group::r--
other::r--

$chmod 777 file2.txt 
$ls -l file2.txt 
-rwxrwxrwx 1 jeffrin jeffrin 6 Jan 22 22:44 file2.txt
$setfacl --restore=permissions.txt 
$ls -l file2.txt 
-rw-r--r-- 1 jeffrin jeffrin 6 Jan 22 22:44 file2.txt
$