Skip to content

Commit b106ccf

Browse files
committed
20211114 NextCloud documentation - backup/restore - simplified commands
Changes some multi-step commands to use single-step equivalents (eg `stop` then `rm -rf` replaced with `rm --force --stop -v`)
1 parent 5ba4bb9 commit b106ccf

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

docs/Containers/NextCloud.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,26 +304,25 @@ If you want to take a backup, something like the following will get the job done
304304
$ cd ~/IOTstack
305305
$ BACKUP_TAR_GZ=$PWD/backups/$(date +"%Y-%m-%d_%H%M").$HOSTNAME.nextcloud-backup.tar.gz
306306
$ touch "$BACKUP_TAR_GZ"
307-
$ docker-compose stop nextcloud nextcloud_db
308-
$ docker-compose rm -f nextcloud nextcloud_db
307+
$ docker-compose rm --force --stop -v nextcloud nextcloud_db
309308
$ sudo tar -czf "$BACKUP_TAR_GZ" -C "./volumes/nextcloud" .
310-
$ docker-compose up -d
309+
$ docker-compose up -d nextcloud
311310
```
312311

313-
Note:
312+
Notes:
314313

315314
* A *baseline* backup takes over 400MB and about 2 minutes. Once you start adding your own data, it will take even more time and storage.
315+
* The `up` of the NextCloud container implies the `up` of the Nextcloud_DB container.
316316

317317
To restore, you first need to identify the name of the backup file by looking in the `backups` directory. Then:
318318

319319
```
320320
$ cd ~/IOTstack
321321
$ RESTORE_TAR_GZ=$PWD/backups/2021-06-12_1321.sec-dev.nextcloud-backup.tar.gz
322-
$ docker-compose stop nextcloud nextcloud_db
323-
$ docker-compose rm -f nextcloud nextcloud_db
322+
$ docker-compose rm --force --stop -v nextcloud nextcloud_db
324323
$ sudo rm -rf ./volumes/nextcloud/*
325324
$ sudo tar -x --same-owner -z -f "$RESTORE_TAR_GZ" -C "./volumes/nextcloud"
326-
$ docker-compose up -d
325+
$ docker-compose up -d nextcloud
327326
```
328327

329328
If you are running from an SD card, it would be a good idea to mount an external drive to store the data. Something like:

0 commit comments

Comments
 (0)