Skip to content

Commit dc65efe

Browse files
committed
Update management commands
This updates the command samples to use the `python -m` form for invoking the `manage.py` script improving portability across environments.
1 parent 3c41d79 commit dc65efe

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

management.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ A full list of commands can be retrieved as follows:
1616
source /etc/default/archivematica-storage-service || \
1717
source /etc/sysconfig/archivematica-storage-service \
1818
|| (echo 'Environment file not found'; exit 1)
19-
cd /usr/lib/archivematica/storage-service
20-
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py help
19+
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python -m archivematica.storage_service.storage_service.manage \
20+
help
2121
";
2222
2323
If you want to see the help message of a specific command, try:
@@ -29,8 +29,8 @@ If you want to see the help message of a specific command, try:
2929
source /etc/default/archivematica-storage-service || \
3030
source /etc/sysconfig/archivematica-storage-service \
3131
|| (echo 'Environment file not found'; exit 1)
32-
cd /usr/lib/archivematica/storage-service
33-
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py help create_aip_replicas
32+
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python -m archivematica.storage_service.storage_service.manage \
33+
help create_aip_replicas
3434
";
3535
3636
We've looked up the command for
@@ -59,8 +59,8 @@ Replicator locations.
5959
source /etc/default/archivematica-storage-service || \
6060
source /etc/sysconfig/archivematica-storage-service \
6161
|| (echo 'Environment file not found'; exit 1)
62-
cd /usr/lib/archivematica/storage-service
63-
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py create_aip_replicas
62+
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python -m archivematica.storage_service.storage_service.manage \
63+
create_aip_replicas
6464
";
6565
6666
The command accepts the following parameters:

migration-sqlite-mysql.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Make sure that you take a back up of your SQLite database before you proceed.
2727
source /etc/default/archivematica-storage-service || \
2828
source /etc/sysconfig/archivematica-storage-service \
2929
|| (echo 'Environment file not found'; exit 1)
30-
cd /usr/lib/archivematica/storage-service
31-
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py dumpdata \
32-
--exclude=auth.permission --exclude=contenttypes --exclude=sessions.session --natural-foreign --natural-primary --indent 4 -o /tmp/datadump.json
30+
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python -m archivematica.storage_service.storage_service.manage \
31+
dumpdata \
32+
--exclude=auth.permission --exclude=contenttypes --exclude=sessions.session --natural-foreign --natural-primary --indent 4 -o /tmp/datadump.json
3333
";
3434

3535
3. Create the MySQL database::
@@ -53,8 +53,8 @@ Make sure that you take a back up of your SQLite database before you proceed.
5353
source /etc/default/archivematica-storage-service || \
5454
source /etc/sysconfig/archivematica-storage-service \
5555
|| (echo 'Environment file not found'; exit 1)
56-
cd /usr/lib/archivematica/storage-service
57-
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py migrate
56+
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python -m archivematica.storage_service.storage_service.manage \
57+
migrate
5858
";
5959

6060
7. Load the JSON export::
@@ -64,8 +64,8 @@ Make sure that you take a back up of your SQLite database before you proceed.
6464
source /etc/default/archivematica-storage-service || \
6565
source /etc/sysconfig/archivematica-storage-service \
6666
|| (echo 'Environment file not found'; exit 1)
67-
cd /usr/lib/archivematica/storage-service
68-
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py loaddata /tmp/datadump.json
67+
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python -m archivematica.storage_service.storage_service.manage \
68+
loaddata /tmp/datadump.json
6969
";
7070

7171
8. Start Storage Service::

0 commit comments

Comments
 (0)