summaryrefslogtreecommitdiff
path: root/man.md/reflector.1.md
blob: c468d4f730418dc72b33415b922f3d253495b0a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Name

reflector - retrieve and filter the latest Pacman mirrorlist

# Synopsis

`reflector [arguments]`


# Description

reflector is a Python script and associated Python module that can retrieve up-to-date Arch Linux mirror data from the [Mirror Status](https://www.archlinux.org/mirrors/status/) web interface.


# Arguments

See `reflector --help`.

# Examples

Print the latest mirrorlist to STDOUT:

~~~{.sh}
reflector
~~~

Sort the five most recently synchronized mirrors by download speed and overwrite the local mirrorlist:

~~~{.sh}
reflector --latest 5 --sort rate --save /etc/pacman.d/mirrorlist
~~~

Select the 200 most recently synchronized HTTP or HTTPS mirrors, sort them by download speed, and overwrite the file /etc/pacman.d/mirrorlist:

~~~{.sh}
reflector --latest 200 --protocol http,https --sort rate --save /etc/pacman.d/mirrorlist
~~~

Select  the HTTPS mirrors synchronized within the last 12 hours and located in either France or Germany, sort them by download speed, and overwrite the file `/etc/pacman.d/mirrorlist` with the results:

~~~{.sh}
reflector --country France,Germany --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
~~~


# Systemd Integration

Reflector includes systemd service and timer units that can be used to automatically update Pacman's mirrorlist. To use the timer, edit the configuration file at `/etc/xdg/reflector/reflector.conf` and then enable the timer with

~~~{.sh}
systemctl enable reflector.timer
systemctl start reflector.timer
~~~

Check that status with `systemctl list-timers`. To update the mirrorlist immediately instead of waiting for the scheduled operation, run `systemctl start reflector.service`.

# See Also

`pacman(8)`