rewrite the sop for archiving a fedora release into markdown for this repo
This commit is contained in:
parent
c9ad4a18ee
commit
e87b154639
1 changed files with 152 additions and 0 deletions
152
archiving_a_fedora_release.md
Normal file
152
archiving_a_fedora_release.md
Normal file
|
@ -0,0 +1,152 @@
|
|||
# How to archive a Fedora Release
|
||||
.. title: How to Archive Old Fedora Releases.
|
||||
.. slug: archive-old-fedora
|
||||
.. date: 2016-04-08 updated: 2020-09-25
|
||||
.. taxonomy: Releng/Infrastructure
|
||||
|
||||
|
||||
## Document Info
|
||||
|
||||
The Fedora download servers contain terabytes of data, and to allow
|
||||
for mirrors to not have to take all of that data, infrastructure
|
||||
regularly moves data of end of lifed releases (from /pub/fedora/linux)
|
||||
to the archives section (/pub/archive/fedora/linux)
|
||||
|
||||
## Steps Involved
|
||||
|
||||
1. log into ```batcave01.iad2.fedoraproject.org```
|
||||
2. sudo log into a server which has read-write access to the download
|
||||
NFS partition. Then change to the appropriate user.
|
||||
```
|
||||
$ sudo -i ssh root@bodhi-backend01.iad2.fedoraproject.org
|
||||
# su - ftpsync
|
||||
$
|
||||
```
|
||||
3. Then change into the releases directory.
|
||||
```
|
||||
$ cd /pub/fedora/linux/releases
|
||||
```
|
||||
|
||||
4. Check to see that the target directory doesn't already exist.
|
||||
```
|
||||
$ ls /pub/archive/fedora/linux/releases/
|
||||
$ ls /pub/archive/fedora-secondary/releases/
|
||||
```
|
||||
|
||||
5. If the target directory does not already exist, do a recursive link
|
||||
copy of the tree you want to the target. This works because
|
||||
currently archives is on the same partition.
|
||||
```
|
||||
$ cp -lvpnr 21 /pub/archive/fedora/linux/releases/21
|
||||
```
|
||||
Common errors which might occur at this time is finding that the
|
||||
NFS partition is not mounted read-write. Other errors can occur
|
||||
where the NFS is read-write, but ftpsync does not have rights to
|
||||
copy a file. These need to be dealt with individually.
|
||||
|
||||
Another error which happens when I script things is that you find
|
||||
out that everything got copied into
|
||||
/pub/archive/fedora/linux/releases/21/21 even though it shouldn't.
|
||||
|
||||
6. If the target directory already exists, then we need to do a
|
||||
recursive rsync to update any changes in the trees since the
|
||||
previous copy.
|
||||
|
||||
```
|
||||
$ rsync -avSAXHP --delete ./21/ /pub/archive/fedora/linux/releases/21/
|
||||
```
|
||||
|
||||
Again common errors which need to be dealt with are permission
|
||||
items. Usually it is contacting other people in release
|
||||
engineering to see what is needed.
|
||||
|
||||
7. We now do the updates and updates/testing in similar ways.
|
||||
|
||||
```
|
||||
$ cd ../updates/
|
||||
$ cp -lpnr 21 /pub/archive/fedora/linux/updates/21
|
||||
$ cd testing
|
||||
$ cp -lpnr 21 /pub/archive/fedora/linux/updates/testing/21
|
||||
|
||||
$ cd ../updates/
|
||||
$ rsync -avSAXHP --delete 21/ /pub/archive/fedora/linux/updates/21/
|
||||
$ cd testing
|
||||
$ rsync -avSAXHP --delete 21/ /pub/archive/fedora/linux/updates/testing/21/
|
||||
```
|
||||
|
||||
8. At this point we now do the same with the fedora-secondary trees
|
||||
with similar syntax.
|
||||
```
|
||||
$ cd /pub/fedora-secondary/releases/
|
||||
$ cp -lpnr 21 /pub/archive/fedora-secondary/releases/21
|
||||
$ cd ../updates/
|
||||
$ cp -lpnr 21 /pub/archive/fedora-secondary/updates/21
|
||||
$ cd testing
|
||||
$ cp -lpnr 21 /pub/archive/fedora-secondary/updates/testing/21
|
||||
|
||||
$ cd /pub/fedora-secondary/releases/
|
||||
$ rsync -avSAXHP --delete 21/ /pub/archive/fedora-secondary/releases/21/
|
||||
$ cd ../updates/
|
||||
$ rsync -avSAXHP --delete 21/ /pub/archive/fedora-secondary/updates/21/
|
||||
$ cd testing
|
||||
$ rsync -avSAXHP --delete 21/ /pub/archive/fedora-secondary/updates/testing/21/
|
||||
```
|
||||
|
||||
8. Announce to the mirror list this has been done and that in 2 weeks
|
||||
you will move the old trees to archives.
|
||||
|
||||
9. In two weeks, log into mm-backend01 and run the archive script
|
||||
|
||||
```
|
||||
$ sudo -i ssh root@mm-backend01.iad2.fedoraproject.org
|
||||
# sudo -u mirrormanager mm2_move-to-archive \
|
||||
--originalCategory="Fedora Linux" \
|
||||
--archiveCategory="Fedora Archive" \
|
||||
--directoryRe='/21/Everything'
|
||||
# sudo -u mirrormanager mm2_move-to-archive \
|
||||
--originalCategory="Fedora Secondary Linux" \
|
||||
--archiveCategory="Fedora Archive" \
|
||||
--directoryRe='/21/Everything'
|
||||
```
|
||||
|
||||
10. If there are problems, the postgres DB may have issues and so you need to
|
||||
get a DBA to update the backend to fix items.
|
||||
|
||||
11. Wait an hour or so then you can remove the files from the main tree.
|
||||
|
||||
```
|
||||
$ sudo -i ssh bodhi-backend01.iad2.fedoraproject.org
|
||||
# su - ftpsync
|
||||
$ cd /pub/fedora/linux/releases
|
||||
$ cd 21
|
||||
$ ls # make sure you have stuff here
|
||||
$ rm -rf *
|
||||
$ ln ../20/README .
|
||||
$ cd ../../updates/21
|
||||
$ ls # make sure you have stuff here
|
||||
$ rm -rf *
|
||||
$ ln ../20/README .
|
||||
$ cd ../testing/21
|
||||
$ ls # make sure you have stuff here
|
||||
$ rm -rf *
|
||||
$ ln ../20/README .
|
||||
|
||||
$ cd /pub/fedora-secondary/releases
|
||||
$ cd 21
|
||||
$ ls # make sure you have stuff here
|
||||
$ rm -rf *
|
||||
$ ln ../20/README .
|
||||
$ cd ../../updates/21
|
||||
$ ls # make sure you have stuff here
|
||||
$ rm -rf *
|
||||
$ ln ../20/README .
|
||||
$ cd ../testing/21
|
||||
$ ls # make sure you have stuff here
|
||||
$ rm -rf *
|
||||
$ ln ../20/README .
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue