Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ function transfer_log_state() {
MACHINE_ID=$(cat /etc/machine-id || echo invalid)
echo "Successfully mounted old /var partition, copying contents for machine id: ${MACHINE_ID}"

# First, copy actual journal files.
mkdir -p /mnt/var_new/log/journal
if cp -vr /mnt/var_old/log/journal/"${MACHINE_ID}" /mnt/var_new/log/journal/"${MACHINE_ID}"; then
# First, copy latest journal files.
mkdir -p /mnt/var_new/log/journal/"${MACHINE_ID}"
if cp -pv $(ls -t /mnt/var_old/log/journal/"${MACHINE_ID}"/*.journal | head -3) /mnt/var_new/log/journal/"${MACHINE_ID}"/; then
chown -R root.systemd-journal /mnt/var_new/log/journal/
chcon -R system_u:object_r:systemd_journal_t:s0 /mnt/var_new/log/journal/"${MACHINE_ID}"
ls -lZ /mnt/var_new/log/journal/"${MACHINE_ID}"
Expand Down
Loading