Skip to content

[BUG] time of last backup incorrect #3339

@danmack

Description

@danmack

User Story

The last backup time is still incorrect in v21.2.0

% ls -1tr lgsm/backup/*.tar.gz
vhserver-2021-03-03-133521.tar.gz
vhserver-2021-03-04-130044.tar.gz
vhserver-2021-03-05-145711.tar.gz
vhserver-2021-03-06-111752.tar.gz
vhserver-2021-03-06-115542.tar.gz
% ./vhserver backup
[ OK ] Backing up vhserver: Backup starting

  • Previous backup was created 2 days ago, total size 772M
    [ OK ] Backing up vhserver: Completed: vhserver-2021-03-06-115742.tar.gz, total size 773M

The command on line 215 does ls -1tr | head -1, it should probably be ls -1tr | tail -1

ls -1tr lgsm/backup/*.tar.gz
vhserver-2021-03-03-133521.tar.gz
vhserver-2021-03-04-130044.tar.gz
vhserver-2021-03-05-145711.tar.gz
vhserver-2021-03-06-111752.tar.gz
vhserver-2021-03-06-115542.tar.gz
% ./vhserver backup
[ OK ] Backing up vhserver: Backup starting

  • Previous backup was created 2 days ago, total size 772M
    [ OK ] Backing up vhserver: Completed: vhserver-2021-03-06-115742.tar.gz, total size 773M

Basic info

  • Distro: CentOS 8 stream
  • Game: vhserver
  • Command: backup
  • LinuxGSM version: v21.2.0

Further Information

A clear description of what the bug is and any ideas on how to resolve it. Plus any further context that might be relevant to the issue.

The last backup message is incorrect because lgsm/functions/info_distro.sh:215 is using head instead of tail.

To Reproduce

./vhserver backup

View output and manually compare with list of your backups

Expected behaviour

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions