How to move files from one server to another in bulk
YetiShare is in the process of providing file move functionality within the admin area which will allow the moving of individual files from one server to another. To move ALL files from one server to another it's easier (and quicker!) to do this manually.
- Setup your new file server and test it's uploading and downloading files fine.
- Make note of the new server 'id' from your database. It's in the 'file_server' table.
- Backup your database.
- Copy or move all files from your old server (in files/) to your new server. Ensure you keep the subfolders and same filenames.
- Update the serverId on all file records in your database to point at the new server. Below, replace NEW_SERVER_ID with your new server id (noted above) and OLD_SERVER_ID with your old server id.
UPDATE file SET serverId = NEW_SERVER_ID WHERE serverId = OLD_SERVER_ID;
All your files should now work as they did before but from the new server. Once you've confirmed everything is working, you can remove the old server record in 'file_server' via the database.
How to move a Single File to/from FTP Storage
- Open your database via phpMyAdmin or similar.
- Within the file_server table, make note of the id of the new file server.
- Locate the file record within the 'file' table.
- The 'localFilePath' will show where the file is stored on it's current server. Move the actual file to your new server. Add the sub-folder if it doesn't already exist. So you'll end up with something like: [server]/e0/e069a959a257fb49ccaaabaf029f0c2d
- Within the database, update the serverId in the 'file' table record with the new server 'id' you noted above.