Skip to content

Commit

Permalink
[sonic_installer] preserve the backup file/directories structure, att…
Browse files Browse the repository at this point in the history
…ributes etc (sonic-net#410)

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
  • Loading branch information
zhenggen-xu authored and lguohan committed Dec 12, 2018
1 parent a611193 commit fda7742
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sonic_installer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def install(url):
run_command(image_path)
run_command('grub-set-default --boot-directory=' + HOST_PATH + ' 0')
run_command("rm -rf /host/old_config")
run_command("cp -r /etc/sonic /host/old_config")
# copy directories and preserve original file structure, attributes and associated metadata
run_command("cp -ar /etc/sonic /host/old_config")

# sync filesystem, keep at last step.
run_command("sync")
Expand Down

0 comments on commit fda7742

Please sign in to comment.