Virtualmin - SSH Backup Error - Strftime-style time substitutions

Hello,

I have activated SSH backup, with the following details:

Local server:
**Operating system: CentOS Linux 7.9.2009
**OS version: 6.16.gpl
File on server: /data/0.1.Backup_Server/0.3_%Y/0.1_Incremental/4.0_SV4/%y-%m-%d
[Do strftime-style time substitutions on file or directory name] it is cheked.

Destination server:
**Operating system: CentOS Linux 7.9.2009
**OS version: 6.16.gpl

When i use 0.3_%Y I receive the following error:

4 servers backed up successfully, 0 had errors.
Deleting backups from /data/0.1.Backup_Server/0.3_%Y/0.1_Incremental/4.0_SV4/%y-%m-%d on SSH server 192.168.1.241 older than 10 days …
… failed to list directory via SSH : george.dobrescu@192.168.1.241’s password:
ls: cannot access /data/0.1.Backup_Server/0.3_%Y/0.1_Incremental/4.0_SV4: No such file or directory

Where i use 0.3_2021 instead of 0.3_%Y there is no error.

Kind regards,

That might be a parser bug. What happens if you take out the _? It’s also possible the parser only works on the last part of the path…which would be weird, but possible, as I’d guess it does split it up…it should just probably do it after the substitution happens.

Hello,

It looks like the error persists. Bellow example:

Starting backup of 1 domains to /data/0.1.Backup_Server/%Y/0.1_Incremental/4.0_SV4/%y-%m-%d on SSH server 192.168.1.241 ..
Creating backup for virtual server server4.***.ro ..

Copying virtual server configuration ..
.. done

Backing up Cron jobs ..
.. none defined.

Copying records in DNS domain ..
.. done

Saving mail aliases ..
.. done

Saving mail and FTP users ..
.. done

Backing up mail and FTP user Cron jobs ..
.. none to backup

Backing up Dovecot control files ..
.. none found

Copying Apache virtual host configuration ..
.. done

Copying Apache log files ..
.. done

Copying Webalizer configuration files ..
.. done

Copying SSL Apache virtual host configuration and certificate ..
.. done

Copying Logrotate configuration ..
.. done

Dumping MariaDB database server4 ..
.. done

Copying Procmail and SpamAssassin configuration files ..
.. done

Backing up Webmin ACL files ..
.. done

Creating incremental TAR file of home directory ..
.. done

Uploading archive to SSH server 192.168.1.241 ..
.. done

.. completed in 3 seconds

1 servers backed up successfully, 0 had errors. 
Backup is complete. Final size was 158.04 KiB.

Deleting backups from /data/0.1.Backup_Server/%Y/0.1_Incremental/4.0_SV4/%y-%m-%d on SSH server 192.168.1.241 older than 10 days ..

.. failed to list directory via SSH : george.dobrescu@192.168.1.241's password: ls: cannot access /data/0.1.Backup_Server/%Y/0.1_Incremental/4.0_SV4: No such file or directory 

I was about to create a support request for this.
The same is occuring with mine, it does create and upload the backup as intended, but it can’t delete old backups. But this only happens if I use strftime-style in folders recursively (../%Y/%m/domain.tld.tar.gz), if I just use 1 folder (../%Y-%m/domain.tld.tar.gz), it works normally.

Here’s my output (it doesn’t matter if I select Single archive file or One file per server)

Backup failed! See the progress output above for the reason why. Total backup time was 00 minutes, 28 seconds.

Sent by Virtualmin at: https://xxxx


    Saving Virtualmin configuration ..
    .. done

    Saving templates and plans ..
    .. done

    Saving resellers ..
    .. done

    Saving email templates ..
    .. done

    Saving custom fields, links, categories and shells ..
    .. done

    Saving custom script installers ..
    .. done

    Saving scheduled backups and keys ..
    .. done

    Saving FTP directory restrictions ..
    .. done

    Saving DKIM settings ..
    .. done

    Saving greylisting settings ..
    .. done

    Save mail rate limiting configuration ..
    .. done

    Saving mail server configuration ..
    .. done

.. done

Creating final backup archive ..
.. done

Uploading archive to SSH server XXXXXXXXX ..
.. done


9 Virtualmin configuration settings backed up successfully.
Deleting backups from /home/backups/backup-vps/%Y/%m/virtualmin-configs on SSH server XXXXXXXXX older than 6 days ..
    .. failed to list directory via SSH : XXXXXXX's password:
ls: cannot access '/home/backups/backup-vps/%Y': No such file or directory

Yeah, that’s somewhat bug-like. I’ve run into it in the past, too, and never raised it up to Jamie’s attention…but I don’t think it’d be bad to do so. It’s probably just an oversight on his part. (The solution might just be to prevent the path from getting complicated like that, rather than handling it. I think either is fine…it’s fine to have the whole date in one directory name.)

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.