Suggestions for backing up php site and mysql db

前端 未结 4 1910
走了就别回头了
走了就别回头了 2021-01-25 05:03

do you have any good suggestions how to backup remote php site and mysql, and upload it to another remote ftp? I do have shell access and it is linux system.

Kind of lam

4条回答
  •  无人共我
    2021-01-25 05:54

    Use mysqldump do dump the DB into a "data" directory within the site.
    An alternative would be SELECT INTO OUTFILE if you already have the SQL scheme stored somewhere.

    Use tar to pack up the website contents.

    tar -xvf site.tar
    

    Use FTP, SCP, SFTP, etc to transfer that to the new location, unpack, then depending on how the DB was dumped restore the DB and give it a whirl.

提交回复
热议问题