Suggestions for backing up php site and mysql db

前端 未结 4 1900
走了就别回头了
走了就别回头了 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:49

    I second rsync but with a helping of mysqldump to dump your databases to a plain text file (assuming the DB is not too large).

    0 讨论(0)
  • 2021-01-25 05:54

    Depends on the capabilities of your shell and the size of your site, but the first step could be very trivial: Use mysqldump and zip it together with your webpage. For uploading your archive you can maybe use wput or simply fall back to ftp which should be available on most shells.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-01-25 06:01

    Have you tried rsync?

    Take a look at the documentation and examples.

    Otherwise, I think you should ask this on serverfault.

    0 讨论(0)
提交回复
热议问题