mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-28 10:40:07 +00:00
Compare commits
2 Commits
24255444eb
...
d624b9b305
| Author | SHA1 | Date | |
|---|---|---|---|
| d624b9b305 | |||
| c4c565ec90 |
@ -49,8 +49,8 @@ echo "# BACKUP: $DIR"
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
mkdir -p "${DIR}"
|
||||
cd "${DIR}"
|
||||
@ mkdir -p "${DIR}"
|
||||
@ cd "${DIR}"
|
||||
|
||||
@ lxc-attach $ID -- turnkey-occ maintenance:mode --on
|
||||
|
||||
@ -70,9 +70,9 @@ cd "${DIR}"
|
||||
@ lxc-attach $ID -- mysqldump --single-transaction nextcloud > nextcloud.sql
|
||||
|
||||
# files...
|
||||
pct mount $ID
|
||||
rsync -Aavx /var/lib/lxc/$ID/rootfs/var/www/nextcloud-data .
|
||||
pct unmount $ID
|
||||
@ pct mount $ID
|
||||
@ rsync -Aavx /var/lib/lxc/$ID/rootfs/var/www/nextcloud-data .
|
||||
@ pct unmount $ID
|
||||
|
||||
@ lxc-attach $ID -- turnkey-occ maintenance:mode --off
|
||||
|
||||
|
||||
@ -19,6 +19,12 @@ readConfig
|
||||
|
||||
# XXX handle commandline args...
|
||||
|
||||
usage(){
|
||||
echo "$0 FROM TO"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
@ -34,13 +40,13 @@ readConfig
|
||||
| lxc-attach $TO -- mysql nextcloud"
|
||||
|
||||
# files...
|
||||
pct mount $FROM
|
||||
pct mount $TO
|
||||
rsync -Aavx \
|
||||
@ pct mount $FROM
|
||||
@ pct mount $TO
|
||||
@ rsync -Aavx \
|
||||
/var/lib/lxc/$FROM/rootfs/var/www/nextcloud-data
|
||||
/var/lib/lxc/$TO/rootfs/var/www/nextcloud-data
|
||||
pct unmount $FROM
|
||||
pct unmount $TO
|
||||
@ pct unmount $FROM
|
||||
@ pct unmount $TO
|
||||
|
||||
@ lxc-attach $FROM -- turnkey-occ maintenance:mode --off
|
||||
@ lxc-attach $TO -- turnkey-occ maintenance:mode --off
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user