Tag: backup

  • Virtualmin backup restore error

    During a recent process of restoring a site from a Virtualmin backup archive I encountered this discouraging error message during the upload:

    Restore failed : The specified source does not contain any domains, or is not a Virtualmin backup

    No need to say that the archive indeed contained several domains plus it was created by Virtualmin itself in the past…

    A quick search provided me with a hint that the upload and restore process may not work as desired, but instead first upload and thereafter restore the backup archive from the local server may give much better results.

    So simple that I should have tried it the first.

  • Error: Could not open the local file – FTP madness!

    Trying to move some automatic backups from one location to another became a bit of a struggle recently. The backups are created automatically and uploaded to a file server at a scheduled pattern. From this file server I had to use some of the backups and tried to download them to my local machine. This is where the problem started.

    I am long time user of the excellent FTP client named FileZilla and very seldom experience any issues with it. But this time during the download process I kept receiving this weird error message:

    Error:    Could not open the local file path/filename
    Error:    Download failed

    I initially thought about some permission problems like no read access until I swiftly realised it was actually on the local side the issue was and not on the server. This just made no sense as obviously why would it want to open the file when it actually had to create the file instead. I tried to download the backups to different locations on the hard disks, even external ones as well, to see if oddly enough they had magically become write protected. This was not successful and I started to think of the directory structure as downloading the individual file worked just fine.

    So to summarise:

    1. Downloading the directory containing the backups did not work.
    2. Downloading each individual file inside the directory worked as expected.

    Very strange indeed…

    I actually did not break it until the following morning when I woke up with the solution. I am not sure what happened as I would not dream about such a pity issue but I just woke up and Eureka!

    In hindsight it was really obvious what the problem was but at the point it just did not come to my mind.

    Linux and Windows have some dramatic differences and one of them is the fact that file and directory names under Windows are limited to certain characters while Linux pretty much takes it all. I was trying to download directories to a Windows XP PC with a colon (:) in the name, such as . This is incompatible with Windows and therefore FileZilla was not permitted to create such directories anywhere on the hard disks.

    Never use the following characters in file or directory names if you expect Windows compatibility:

    / \ : * ? " < > |
  • Virtualmin scheduled backups strftime usage

    I have been using Virtualmin for several years which is one of the greatest modules for Webmin allowing simple set-up and management of virtual hosts. Inside the “Scheduled Backup” feature I came across the “Do strftime-style time substitutions on file or directory name” check box but never actually properly made use of it:

    Virtualmin Scheduled Backup

    I came across a project which required very frequent backups and to distinguish each backup from another I decided to give it a shot. The strftime function uses standard POSIX conversion specifications which very easily lets you build powerful combinations of date and time.

    As an example you can use the following string:

    /backup_%Y_%m_%d_%H.%M

    which would leave a directory with the following name:

    Now each backup will be created with a different name instead of simply overwriting the previous one.