From 678e689504b0ef9bdd9962ca0d1afbdf8b001899 Mon Sep 17 00:00:00 2001 From: Yanks Yoon <37652070+yanksyoon@users.noreply.github.com> Date: Wed, 29 May 2024 16:24:21 +0900 Subject: [PATCH] docs: add -a flag to preserve ownership (#153) * add -a flag to preserve ownership * fix spacing --- docs/how-to/backup-and-restore-jenkins.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/how-to/backup-and-restore-jenkins.md b/docs/how-to/backup-and-restore-jenkins.md index 7020c9d4..ec6d2808 100644 --- a/docs/how-to/backup-and-restore-jenkins.md +++ b/docs/how-to/backup-and-restore-jenkins.md @@ -51,8 +51,8 @@ You now have the compressed Jenkins data on your host system. JENKINS_UNIT=jenkins-k8s/0 juju scp --container jenkins ./jenkins_backup.tar.gz $JENKINS_UNIT:/jenkins_backup.tar.gz juju ssh --container jenkins $JENKINS_UNIT tar zxvf jenkins_backup.tar.gz -juju ssh --container jenkins $JENKINS_UNIT chown -R 2000:2000 /backup -juju ssh --container jenkins $JENKINS_UNIT cp -aR /backup/* /var/lib/jenkins +juju ssh --container jenkins $JENKINS_UNIT chown -R jenkins:jenkins /backup +juju ssh --container jenkins $JENKINS_UNIT cp -avR /backup/* /var/lib/jenkins juju ssh --container jenkins $JENKINS_UNIT rm -rf /backup /jenkins_backup.tar.gz ``` 2. Restart pebble for the changes to take effect