Filesystem Migrate Command

The filesystem:migrate command enables you to easily migrate storage/ files stored locally to an s3 compatible service, or vice versa. See Cloud Storage for more information.

Usage

The command expects two arguments from and to. These are the names of the drivers defined in config/filesystems.php. By default, we only provide two drivers s3 and local. For example, to migrate files stored locally to an s3 compatible service, you would run:


php artisan filesystem:migrate local s3

To migrate files stored on an s3 compatible service to your local directory, you would run the inverse:


php artisan filesystem:migrate s3 local

Example Output


Migrating from driver local to s3 ...
Migrating directory attachments ...
    0 [▓░░░░░░░░░░░░░░░░░░░░░░░░░░░]

Skipping email_cache ...
Skipping email_log ...
Migrating directory exports ...
   18 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]

Migrating directory public ...
 3759 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]

Skipping purifier_cache ...
Skipping rss_cache ...
Migrating directory selfservice ...
   44 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]

Skipping session_locks ...
Skipping swiftmailer_cache ...
Migrating directory tickets ...
 3712 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]

Usage Options

Please refer to the help information which can be found by running:

php artisan help filesystem:migrate