fr0tt / benotes

An open source self hosted notes and bookmarks taking web app.
https://benotes.org
MIT License
746 stars 48 forks source link

Backup #93

Closed roughnecks closed 1 year ago

roughnecks commented 1 year ago

Hello,

I have set this on my .env file: RUN_BACKUP=true And have scheduled a cron job like this:

0 * * * * cd /home/notes/benotes && php artisan schedule:run >> /dev/null 2>&1

Now I checked my backup folder inside storage and it's actually empty.. what gives? Also, trying to run the cron command manually tells me that:

No scheduled commands are ready to run.

Thanks

fr0tt commented 1 year ago

Hi,

It works as expected. As you can read in the documentation: "By default scheduled backups are created every night. If you wish to change..."

As also mentioned you can manually test it with the command php artisan backup:run

roughnecks commented 1 year ago

yeah, it's weird because I installed yesterday but tonight no backup was taken..

I'll try manually ASAP.

Il 16 ottobre 2023 15:13:00 CEST, fr0tt @.***> ha scritto:

It works as expected. As you can read in the document: "By default scheduled backups are created every night. If you wish to change..."

As also mentioned you can manually test it with the command php artisan backup:run

-- Reply to this email directly or view it on GitHub: https://github.com/fr0tt/benotes/issues/93#issuecomment-1764459216 You are receiving this because you authored the thread.

Message ID: @.***>

fr0tt commented 1 year ago

I'm sorry I didn't read your message carefully enough. Did you perhaps forget to add RUN_BACKUP = true to your .env file ?

roughnecks commented 1 year ago

It's in my first post 🙂

fr0tt commented 1 year ago

My bad.

Did you try to manually execute it yet ?

You can run php artisan schedule:list to check if it is scheduled and when.

roughnecks commented 1 year ago

Nope, not at my PC right now.

Il 16 ottobre 2023 15:33:47 CEST, fr0tt @.***> ha scritto:

My bad.

Did you try to manually execute it yet ?

You can run php artisan schedule:list to check if it is scheduled and when.

-- Reply to this email directly or view it on GitHub: https://github.com/fr0tt/benotes/issues/93#issuecomment-1764496830 You are receiving this because you authored the thread.

Message ID: @.***>

roughnecks commented 1 year ago
ErrorException                                    Undefined array key "port"                         at app/Console/Commands/RunBackupCommand.php:122     118▕             ->setHost(Arr::first(Arr::wrap($dbConfig['host'] ?? '')))                            119▕             ->setDbName($dbConfig['database'])                                                   120▕             ->setUserName($dbConfig['username'] ?? '')                                           121▕             ->setPassword($dbConfig['password'] ?? '')                                         ➜ 122▕             ->setPort($dbConfig['port']);     123▕                                               124▕         return $dumper;                       125▕     }                                         126▕                                             1   app/Console/Commands/RunBackupCommand.php:122      Illuminate\Foundation\Bootstrap\HandleExceptions::handleError()                                   2   app/Console/Commands/RunBackupCommand.php:50       App\Console\Commands\RunBackupCommand::dumpDatabase()

I have:

DB_CONNECTION=sqlite
DB_DATABASE=/var/lib/benotes/notes.sqlite

Il 16 ottobre 2023 15:22:44 CEST, fr0tt @.***> ha scritto:

As also mentioned you can manually test it with the command php artisan backup:run

roughnecks commented 1 year ago
php artisan schedule:list
+----------------------------------------+-----------+-------------+----------------------------+
| Command                                | Interval  | Description | Next Due                   |
+----------------------------------------+-----------+-------------+----------------------------+
| '/usr/bin/php8.2' 'artisan' backup:run | 0 1 * * * |             | 2023-10-17 01:00:00 +00:00 |
+----------------------------------------+-----------+-------------+----------------------------+
fr0tt commented 1 year ago

Will be fixed in the next release. Seems to have been a problem with the non existent port when using Sqlite.

roughnecks commented 1 year ago

Thanks

fr0tt commented 1 year ago

Should be fixed now in v2.8.1. Feel free to write again if you still have problems with it.