最新消息:20210917 已从crifan.com换到crifan.org

【记录】备份crifan.org的WordPress网站

crifan.org crifan 1648浏览 0评论

打算去备份自己的crifan.org

发现空间不够了:

[root@crifan crifan_wwwroot]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/root        30G   24G  4.7G  84% /

devtmpfs        1.9G     0  1.9G   0% /dev

tmpfs           1.9G     0  1.9G   0% /dev/shm

tmpfs           1.9G  195M  1.7G  11% /run

tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup

tmpfs           384M     0  384M   0% /run/user/0

所剩空间不多了啊

所以不够备份文件的了

但是自己的网站中的文件记得也没这么多,也就5G前后吧

先去:

【已解决】CentOS中如何查看某个文件夹空间占用大小

再去备份文件:

[root@crifan wwwroot]# 7za a -t7z -r -bt www.crifan.org_allFiles_20181213.7z www.crifan.org/*

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21

p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs x64)

Scanning the drive:

5262 folders, 93877 files, 9168525359 bytes (8744 MiB)                       

Creating archive: www.crifan.org_allFiles_20181213.7z

Items to compress: 99139

                                                                               

WARNING: No such file or directory

www.crifan.org/wp-content/backupwordpress-dd39b2992e-backups/crifan-com-1431743904-database-2018-12-11-20-16-36.zip

                                                                               

Files read from disk: 93807

Archive size: 8223783985 bytes (7843 MiB)

WARNINGS for files:

www.crifan.org/wp-content/backupwordpress-dd39b2992e-backups/crifan-com-1431743904-database-2018-12-11-20-16-36.zip : No such file or directory

—————-

WARNING: Cannot open 1 file

看看生成的文件

[root@crifan wwwroot]# pwd

/home/wwwroot

[root@crifan wwwroot]# ls -lh

total 7.7G

drwxr-xr-x  5 www  www  4.0K Dec  6  2017 book.crifan.org

drwxr-xr-x  3 www  www  4.0K Sep 10  2017 crifan

drwx–S— 12 www  ftp  4.0K Mar 20  2018 p7zip_16.02

-rw-r–r–  1 root root 4.1M Jul 14  2016 p7zip_16.02_src_all.tar.bz2

drwxr-xr-x 13 www  www  4.0K Dec 13 11:23 www.crifan.org

-rw-r–r–  1 root root 7.7G Dec 13 20:56 www.crifan.org_allFiles_20181213.7z

再去导出mysql

https://www.crifan.org/files/tool/php/lnmp/phpmyadmin/

->

https://www.crifan.org/files/tool/php/lnmp/phpmyadmin/db_export.php?db=crifan_wp_db

等待下载下来

结果用hk的节点速度不够,换jp就很快下载好了:

然后需要再去下载

如果ssh中用sz去下载太慢

换用ftp软件Filezilla去下载

就慢慢下载吧

后来就下载完毕,备份好了。

【20181225】

后来需要再去备份一次。

所以再去操作一遍:

[root@crifan ~]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/root        30G   19G  9.2G  68% /

devtmpfs        2.0G     0  2.0G   0% /dev

tmpfs           2.0G     0  2.0G   0% /dev/shm

tmpfs           2.0G   65M  1.9G   4% /run

tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup

tmpfs           394M     0  394M   0% /run/user/0

去备份文件:

[root@crifan ~]# cd /home/wwwroot/

[root@crifan wwwroot]# ll -lh

total 4.1M

drwxr-xr-x  5 www  www  4.0K Dec  6  2017 book.crifan.org

drwxr-xr-x  3 www  www  4.0K Sep 10  2017 crifan

drwx–S— 12 www  ftp  4.0K Mar 20  2018 p7zip_16.02

-rw-r–r–  1 root root 4.1M Jul 14  2016 p7zip_16.02_src_all.tar.bz2

drwxr-xr-x 13 www  www  4.0K Dec 22 10:29 www.crifan.org

然后去压缩:

7za a -t7z -r -bt www.crifan.org_allFiles_20181225.7z www.crifan.org/*

等待完成

后来压缩完毕了:

[root@crifan wwwroot]# 7za a -t7z -r -bt www.crifan.org_allFiles_20181225.7z www.crifan.org/*

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21

p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs x64)

Scanning the drive:

28596 folders, 143852 files, 11185688339 bytes (11 GiB)                        

Creating archive: www.crifan.org_allFiles_20181225.7z

Items to compress: 172448

                                                                               

Files read from disk: 143782

Archive size: 9117408627 bytes (8696 MiB)

Everything is Ok

[root@crifan wwwroot]# ls -lh

total 8.5G

drwxr-xr-x  5 www  www  4.0K Dec  6  2017 book.crifan.org

drwxr-xr-x  3 www  www  4.0K Sep 10  2017 crifan

drwx–S— 12 www  ftp  4.0K Mar 20  2018 p7zip_16.02

-rw-r–r–  1 root root 4.1M Jul 14  2016 p7zip_16.02_src_all.tar.bz2

drwxr-xr-x 13 www  www  4.0K Dec 22 10:29 www.crifan.org

-rw-r–r–  1 root root 8.5G Dec 25 16:25 www.crifan.org_allFiles_20181225.7z

有8.5G

同时再去备份数据库:

www.crifan.org / localhost / crifan_wp_db | phpMyAdmin 4.7.3

https://www.crifan.org/files/tool/php/lnmp/phpmyadmin/db_export.php?db=crifan_wp_db

下载下来了:

有205MB

然后再去下载8G多文件下来到本地电脑中

转载请注明:在路上 » 【记录】备份crifan.org的WordPress网站

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
95 queries in 0.202 seconds, using 20.07MB memory